diff --git a/.envrc b/.envrc index c642786..d610c4a 100644 --- a/.envrc +++ b/.envrc @@ -44,7 +44,7 @@ if [ ! -f node.privatekey ]; then DOCKER_DEFAULT_PLATFORM=linux/amd64 docker run --rm -it docker.io/parity/subkey:latest generate-node-key | sed -n '2p' > midnight-node.privatekey # Use the second line of output for NODE_KEY (that's what sed -n '2p' does) fi -export NODE_KEY="$(cat ./midnight-node.privatekey)" +export NODE_KEY_FILE="./midnight-node.privatekey" # # Partner chains config: diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f1c976..da64900 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## 🚀 Features +- Recommended to use NODE_KEY_FILE rather than NODE_KEY - Cardano's ipc socket file is now stored in a docker volume so when stale can be recreated on all OSes. - `cardano-cli.sh`, `midnight-node.sh` and `midnight-shell.sh` execute within the running container. - Switch networks by altering CFG_PRESET only diff --git a/compose.yml b/compose.yml index af88c53..12f7e3e 100644 --- a/compose.yml +++ b/compose.yml @@ -30,7 +30,7 @@ services: - BOOTNODES=${BOOTNODES} - CFG_PRESET=${CFG_PRESET} - DB_SYNC_POSTGRES_CONNECTION_STRING=${DB_SYNC_POSTGRES_CONNECTION_STRING} - - NODE_KEY=${NODE_KEY} + - NODE_KEY_FILE=/midnight-node.privatekey healthcheck: test: [ "CMD", "curl", "-f", "http://localhost:9944/health" ] interval: 2s @@ -38,3 +38,4 @@ services: - ./data:/data - ./envs/${CFG_PRESET}/pc-chain-config.json:/pc-chain-config.json - midnight-data-testnet:/node + - ${NODE_KEY_FILE}:/midnight-node.privatekey:ro