version: "3.5"
services:
cardano-node:
image: inputoutput/cardano-node:1.35.0
environment:
NETWORK:
CARDANO_NODE_SOCKET_PATH: "/ipc/node.socket"
volumes:
- node-${NETWORK}-db:/data
- node-ipc:/ipc
restart: on-failure
logging:
driver: "json-file"
options:
compress: "true"
max-file: "10"
max-size: "50m"
cardano-wallet:
image: inputoutput/cardano-wallet:2022.7.1
volumes:
- wallet-${NETWORK}-db:/wallet-db
- node-ipc:/ipc
ports:
- 8090:8090
entrypoint: []
command: bash -c "
([[ $$NETWORK == \"mainnet\" ]] && $$CMD --mainnet) ||
($$CMD --testnet /config/${NETWORK}/genesis-byron.json)
"
environment:
CMD: "cardano-wallet serve --node-socket /ipc/node.socket --database /wallet-db --listen-address 0.0.0.0"
NETWORK:
restart: on-failure
logging:
driver: "json-file"
options:
compress: "true"
max-file: "10"
max-size: "50m"
cardano-submit-api:
image: inputoutput/cardano-submit-api:1.35.0
environment:
- NETWORK=${NETWORK:-mainnet}
depends_on:
- cardano-node
volumes:
- node-ipc:/node-ipc
ports:
- 8091:8090
restart: on-failure
logging:
driver: "json-file"
options:
max-size: "200k"
max-file: "10"
volumes:
node-mainnet-db:
node-testnet-db:
node-alonzo-purple-db:
wallet-mainnet-db:
wallet-testnet-db:
wallet-alonzo-purple-db:
node-ipc:
node-config:
source : https://github.com/input-output-hk/cardano-wallet/blob/master/docker-compose.yml
Start testnet :
NETWORK=testnet docker compose -f cardano-compose.yml up -d
Start mainnet :
NETWORK=mainnet docker compose -f cardano-compose.yml up -d
To access cardano-cli set CARDANO_NODE_SOCKET_PATH
export CARDANO_NODE_SOCKET_PATH=/var/lib/docker/volumes/root_node-ipc/_data/node.socket