-
Notifications
You must be signed in to change notification settings - Fork 104
Docker
Docker builds are available on DockerHub:
As the service dependencies are all defined in their own images, the docker-compose.yml is used to provide a self-documenting starting point for your own deployment. It is advised to check a copy into source control, and configure it further to meet your requirements. The default configuration uses the IOHK-managed mainnet config, however you can pass NETWORK=testnet
or mount you own config for complete control.
docker compose up -d --build && docker compose logs -f
The initial sync will take some time, but the GraphQL Playground will be available at http://localhost:3100 to check on the sync progress using this query. You can freely stop, stop, and rebuild the stack but retain the volumes under normal circumstances to persist the node and db state. Once initialized
the API is considered ready for use.
docker compose ps -a
Show logs from a specific service
docker compose logs -f cardano-graphql
docker compose top
docker compose stop
If instructed to rebuild the database, @cardano-graphql/cli
has a command to avoid
unnecessarily dropping the cardano-node
volume, and optionally performing a managed backup that can be rolled back.
cgql docker rebuild-service
# Follow instructions, selecting postgres only
If a backup is not required, and you wish to not use the CLI:
docker compose stop
docker volume ls
# copy the volume ending in *_postgres-data to the clipboard
docker volume rm [PASTE]
docker volume ls
# copy the volume ending in *_db-sync-data to the clipboard
docker volume rm [PASTE]
Now follow the Getting Started instructions in the README.
docker compose down -v
If you have a port clash on the host, change the mapping in the docker-compose