@@ -117,14 +117,18 @@ storage and IPC (interprocess communication) so they live beyond the lifetime
117
117
of the container. To mount local host paths instead of using Docker's built in
118
118
volumes, use the local path on the left side of a ` -v ` argument.
119
119
120
- An example of a more advanced configuration for mainnet:
120
+ An example of a more advanced configuration, running a block producer for
121
+ mainnet:
121
122
122
123
``` bash
123
124
docker run --detach \
124
125
--name cardano-node \
125
126
--restart unless-stopped \
126
- -e CARDANO_CONFIG=/opt/cardano/config/mainnet/p2p-config.json \
127
- -e CARDANO_TOPOLOGY=/opt/cardano/config/mainnet/p2p-topology.json \
127
+ -e CARDANO_BLOCK_PRODUCER=true \
128
+ -e CARDANO_SHELLEY_KES_KEY=/opt/cardano/config/keys/kes.skey \
129
+ -e CARDANO_SHELLEY_OPERATIONAL_CERTIFICATE=/opt/cardano/config/keys/node.cert \
130
+ -e CARDANO_SHELLEY_VRF_KEY=/opt/cardano/config/keys/vrf.skey \
131
+ -v /src/cardano/node-keys:/opt/cardano/config/keys \
128
132
-v /srv/cardano/node-db:/opt/cardano/data \
129
133
-v /srv/cardano/node-ipc:/opt/cardano/ipc \
130
134
-p 3001:3001 \
@@ -134,14 +138,14 @@ docker run --detach \
134
138
135
139
The above uses Docker's built in supervisor to restart a container which fails
136
140
for any reason. This will also cause the container to automatically restart
137
- after a host reboot, so long as Docker is configured to start on boot. The
138
- current default configuration for mainnet does not enable P2P, so we override
139
- the configuration with the shipped ` p2p-config.json ` and its accompanying
140
- ` p2p-topology.json ` to enable it. Our node's persistent data and client
141
- communication socket are mapped to ` /src/cardano/node-db ` and
142
- ` /src/cardano/node-ipc ` on the host, respectively. This allows for running
143
- applications directly on the host which may need access to these . Last, we add
144
- mapping the host's port 12798 to the container 12798, which is the port for
141
+ after a host reboot, so long as Docker is configured to start on boot. We
142
+ set variables to configure a block producer and pass the paths to the 3 keys
143
+ we need. Our node's persistent data and client communication socket are mapped
144
+ to ` /src/cardano/node-db ` and ` /src/cardano/ node-ipc ` on the host,
145
+ respectively. This allows for running applications directly on the host which
146
+ may need access to these. We also map ` /src/cardano/node-keys ` on the host to
147
+ a path within the container to support running as a block producer . Last, we
148
+ add mapping the host's port 12798 to the container 12798, which is the port for
145
149
exposing the node's metrics in Prometheus format, for monitoring.
146
150
147
151
This mode of operation allows configuring multiple facets of the node using
0 commit comments