Working with docker-compose and Cardano
Docker-compose is a tool for defining and running multi-container Docker applications and is the recommended approach for building cardano-wallet and cardano-graphql.
We use a YAML file located in each of the Cardano-wallet and cardano-graphql repositories which allows us to configure all running application services. Then, with a single command, we can create and start all the services from the configuration.
The following commands start and stop docker-compose running against the respective environment:
NETWORK=mainnet docker-compose up
NETWORK=testnet docker-compose down
Please note the YAML files provided in each repository cardano-wallet and cardano-graphql are only sample files and should be treated as such. Exchanges and third-party wallets wishing to utilize this server should tailor these files to suit the local production environment.
In order to get started with docker-compose and start building cardano-wallet and cardano-graphql you will need to install docker and then install docker-compose. Please see online docker-compose documentation or visit docker-compose releases GitHub page and run a similar command with the specified version:
curl -L https://github.com/docker/compose/releases/download/1.25.4/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
We can offer the following best practices for your review:
Safely stopping a running container
Upgrade a running instance (remove all volumes)
Deleting a DB volume and force a resync in cardano-wallet
Deleting a DB volume and force a resync cardano-rest
Upgrading cardano-wallet using docker-compose
Upgrading cardano-rest using docker-compose
Upgrading cardano-graphql using docker-compose