Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 18 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ fully configurable code path. Do not set the `NETWORK` environment variable.

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

Cardano Node before 10.3.1:
```bash
docker run --detach \
--name cardano-node \
Expand All @@ -111,6 +112,16 @@ docker run --detach \

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

Cardano Node 10.3.1 and above:
```bash
docker run --detach \
--name cardano-node \
-v node-data:/data/db \
-v node-ipc:/ipc \
-p 3001:3001 \
ghcr.io/blinklabs-io/cardano-node run
```

The above maps port 3001 on the host to 3001 on the container, suitable
for use as a mainnet relay node. We use docker volumes for our persistent data
storage and IPC (interprocess communication) so they live beyond the lifetime
Expand All @@ -129,8 +140,8 @@ docker run --detach \
-e CARDANO_SHELLEY_OPERATIONAL_CERTIFICATE=/opt/cardano/config/keys/node.cert \
-e CARDANO_SHELLEY_VRF_KEY=/opt/cardano/config/keys/vrf.skey \
-v /src/cardano/node-keys:/opt/cardano/config/keys \
-v /srv/cardano/node-db:/opt/cardano/data \
-v /srv/cardano/node-ipc:/opt/cardano/ipc \
-v /srv/cardano/node-db:/data/db \
-v /srv/cardano/node-ipc:/ipc \
-p 3001:3001 \
-p 12798:12798 \
ghcr.io/blinklabs-io/cardano-node run
Expand Down Expand Up @@ -182,7 +193,7 @@ This behavior can be changed via the following environment variables:
- Use your own configuration file to modify the node behavior fully
- `CARDANO_DATABASE_PATH`
- A directory which contains the ledger database files (default:
`/opt/cardano/data`)
`/data/db`)
- This is the location for persistent data storage for the ledger
- `CARDANO_PORT`
- TCP port to bind for listening (default: `3001`)
Expand All @@ -191,11 +202,11 @@ This behavior can be changed via the following environment variables:
`-N2 -A64m -I0 -qg -qb --disable-delayed-os-memory-return`)
- This allows tuning the node for specific use cases or resource contraints
- `CARDANO_SOCKET_PATH`
- UNIX socket path for listening (default: `/opt/cardano/ipc/socket`)
- UNIX socket path for listening (default: `/ipc/node.socket`)
- This socket speaks Ouroboros NtC and is used by client software
- `CARDANO_TOPOLOGY`
- Full path to the Cardano node topology (default:
`${CARDANO_CONFIG_BASE}/mainnet-topology.json`)
`${CARDANO_CONFIG_BASE}/mainnet/topology.json`)

#### Running a block producer

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

```bash
docker run --rm -ti \
-v node-ipc:/opt/cardano/ipc \
-v node-ipc:/ipc \
ghcr.io/blinklabs-io/cardano-node cli <command>
```

This can be added to a shell alias:

```bash
alias cardano-cli="docker run --rm -ti \
-v node-ipc:/opt/cardano/ipc \
-v node-ipc:/ipc \
ghcr.io/blinklabs-io/cardano-node cli"
```

Expand Down
2 changes: 2 additions & 0 deletions bin/entrypoint
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env bash

[[ -n ${DEBUG} ]] && set -x

set -e

if [[ -n ${NETWORK} ]]; then
Expand Down
2 changes: 2 additions & 0 deletions bin/run-client
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env bash

[[ -n ${DEBUG} ]] && set -x

if [[ ${1} == cli ]]; then
shift
fi
Expand Down
2 changes: 2 additions & 0 deletions bin/run-network
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env bash

[[ -n ${DEBUG} ]] && set -x

if [[ -z ${NETWORK} ]]; then
echo "[Error] Cannot obtain NETWORK env variable"
exit 1
Expand Down
6 changes: 4 additions & 2 deletions bin/run-node
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env bash

[[ -n ${DEBUG} ]] && set -x

set -eo pipefail

echo "Running the cardano node ..."
Expand Down Expand Up @@ -36,11 +38,11 @@ CARDANO_NETWORK=${CARDANO_NETWORK:-mainnet}
CARDANO_BIND_ADDR=${CARDANO_BIND_ADDR:-0.0.0.0}
CARDANO_BLOCK_PRODUCER=${CARDANO_BLOCK_PRODUCER:-false}
CARDANO_CONFIG=${CARDANO_CONFIG:-${CARDANO_CONFIG_BASE}/${CARDANO_NETWORK}/config.json}
CARDANO_DATABASE_PATH=${CARDANO_DATABASE_PATH:-/opt/cardano/data}
CARDANO_DATABASE_PATH=${CARDANO_DATABASE_PATH:-/data/db}
CARDANO_LOG_DIR=${CARDANO_LOG_DIR:-/opt/cardano/logs}
CARDANO_PORT=${CARDANO_PORT:-3001}
CARDANO_RTS_OPTS=${CARDANO_RTS_OPTS:--N2 -A64m -I0 -qg -qb --disable-delayed-os-memory-return}
CARDANO_SOCKET_PATH=${CARDANO_SOCKET_PATH:-/opt/cardano/ipc/socket}
CARDANO_SOCKET_PATH=${CARDANO_SOCKET_PATH:-/ipc/node.socket}
CARDANO_TOPOLOGY=${CARDANO_TOPOLOGY:-${CARDANO_CONFIG_BASE}/${CARDANO_NETWORK}/topology.json}
# mithril and devnet
case ${CARDANO_NETWORK} in
Expand Down
Loading