Skip to content

Commit 3f4237f

Browse files
authored
fix: use new defaults for DB and IPC (#246)
Signed-off-by: Chris Gianelloni <[email protected]>
1 parent 23ddefe commit 3f4237f

File tree

5 files changed

+28
-9
lines changed

5 files changed

+28
-9
lines changed

README.md

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ fully configurable code path. Do not set the `NETWORK` environment variable.
100100

101101
To run a Cardano full node on mainnet with minimal configuration and defaults:
102102

103+
Cardano Node before 10.3.1:
103104
```bash
104105
docker run --detach \
105106
--name cardano-node \
@@ -111,6 +112,16 @@ docker run --detach \
111112

112113
**NOTE** The container paths for persist disks are different in this mode
113114

115+
Cardano Node 10.3.1 and above:
116+
```bash
117+
docker run --detach \
118+
--name cardano-node \
119+
-v node-data:/data/db \
120+
-v node-ipc:/ipc \
121+
-p 3001:3001 \
122+
ghcr.io/blinklabs-io/cardano-node run
123+
```
124+
114125
The above maps port 3001 on the host to 3001 on the container, suitable
115126
for use as a mainnet relay node. We use docker volumes for our persistent data
116127
storage and IPC (interprocess communication) so they live beyond the lifetime
@@ -129,8 +140,8 @@ docker run --detach \
129140
-e CARDANO_SHELLEY_OPERATIONAL_CERTIFICATE=/opt/cardano/config/keys/node.cert \
130141
-e CARDANO_SHELLEY_VRF_KEY=/opt/cardano/config/keys/vrf.skey \
131142
-v /src/cardano/node-keys:/opt/cardano/config/keys \
132-
-v /srv/cardano/node-db:/opt/cardano/data \
133-
-v /srv/cardano/node-ipc:/opt/cardano/ipc \
143+
-v /srv/cardano/node-db:/data/db \
144+
-v /srv/cardano/node-ipc:/ipc \
134145
-p 3001:3001 \
135146
-p 12798:12798 \
136147
ghcr.io/blinklabs-io/cardano-node run
@@ -182,7 +193,7 @@ This behavior can be changed via the following environment variables:
182193
- Use your own configuration file to modify the node behavior fully
183194
- `CARDANO_DATABASE_PATH`
184195
- A directory which contains the ledger database files (default:
185-
`/opt/cardano/data`)
196+
`/data/db`)
186197
- This is the location for persistent data storage for the ledger
187198
- `CARDANO_PORT`
188199
- TCP port to bind for listening (default: `3001`)
@@ -191,11 +202,11 @@ This behavior can be changed via the following environment variables:
191202
`-N2 -A64m -I0 -qg -qb --disable-delayed-os-memory-return`)
192203
- This allows tuning the node for specific use cases or resource contraints
193204
- `CARDANO_SOCKET_PATH`
194-
- UNIX socket path for listening (default: `/opt/cardano/ipc/socket`)
205+
- UNIX socket path for listening (default: `/ipc/node.socket`)
195206
- This socket speaks Ouroboros NtC and is used by client software
196207
- `CARDANO_TOPOLOGY`
197208
- Full path to the Cardano node topology (default:
198-
`${CARDANO_CONFIG_BASE}/mainnet-topology.json`)
209+
`${CARDANO_CONFIG_BASE}/mainnet/topology.json`)
199210

200211
#### Running a block producer
201212

@@ -236,15 +247,15 @@ To run a Cardano CLI command, we use the `node-ipc` volume from our node.
236247

237248
```bash
238249
docker run --rm -ti \
239-
-v node-ipc:/opt/cardano/ipc \
250+
-v node-ipc:/ipc \
240251
ghcr.io/blinklabs-io/cardano-node cli <command>
241252
```
242253

243254
This can be added to a shell alias:
244255

245256
```bash
246257
alias cardano-cli="docker run --rm -ti \
247-
-v node-ipc:/opt/cardano/ipc \
258+
-v node-ipc:/ipc \
248259
ghcr.io/blinklabs-io/cardano-node cli"
249260
```
250261

bin/entrypoint

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/usr/bin/env bash
22

3+
[[ -n ${DEBUG} ]] && set -x
4+
35
set -e
46

57
if [[ -n ${NETWORK} ]]; then

bin/run-client

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/usr/bin/env bash
22

3+
[[ -n ${DEBUG} ]] && set -x
4+
35
if [[ ${1} == cli ]]; then
46
shift
57
fi

bin/run-network

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/usr/bin/env bash
22

3+
[[ -n ${DEBUG} ]] && set -x
4+
35
if [[ -z ${NETWORK} ]]; then
46
echo "[Error] Cannot obtain NETWORK env variable"
57
exit 1

bin/run-node

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/usr/bin/env bash
22

3+
[[ -n ${DEBUG} ]] && set -x
4+
35
set -eo pipefail
46

57
echo "Running the cardano node ..."
@@ -36,11 +38,11 @@ CARDANO_NETWORK=${CARDANO_NETWORK:-mainnet}
3638
CARDANO_BIND_ADDR=${CARDANO_BIND_ADDR:-0.0.0.0}
3739
CARDANO_BLOCK_PRODUCER=${CARDANO_BLOCK_PRODUCER:-false}
3840
CARDANO_CONFIG=${CARDANO_CONFIG:-${CARDANO_CONFIG_BASE}/${CARDANO_NETWORK}/config.json}
39-
CARDANO_DATABASE_PATH=${CARDANO_DATABASE_PATH:-/opt/cardano/data}
41+
CARDANO_DATABASE_PATH=${CARDANO_DATABASE_PATH:-/data/db}
4042
CARDANO_LOG_DIR=${CARDANO_LOG_DIR:-/opt/cardano/logs}
4143
CARDANO_PORT=${CARDANO_PORT:-3001}
4244
CARDANO_RTS_OPTS=${CARDANO_RTS_OPTS:--N2 -A64m -I0 -qg -qb --disable-delayed-os-memory-return}
43-
CARDANO_SOCKET_PATH=${CARDANO_SOCKET_PATH:-/opt/cardano/ipc/socket}
45+
CARDANO_SOCKET_PATH=${CARDANO_SOCKET_PATH:-/ipc/node.socket}
4446
CARDANO_TOPOLOGY=${CARDANO_TOPOLOGY:-${CARDANO_CONFIG_BASE}/${CARDANO_NETWORK}/topology.json}
4547
# mithril and devnet
4648
case ${CARDANO_NETWORK} in

0 commit comments

Comments
 (0)