cardano-foundation / cardano-graphql

GraphQL API for Cardano
Apache License 2.0
262 stars 104 forks source link

Issues with docker-compose.yml #657

Closed rajcrypto1980 closed 2 years ago

rajcrypto1980 commented 2 years ago

I had issues when running

DOCKER_BUILDKIT=1 \ COMPOSE_DOCKER_CLI_BUILD=1 \ RESTORE_SNAPSHOT=https://update-cardano-mainnet.iohk.io/cardano-db-sync/12/db-sync-snapshot-schema-12-block-6647999-x86_64.tgz \ docker-compose up -d --build &&\ docker-compose logs -f

Before I ran above, I followed the README.md and ran:

git clone \ --single-branch \ --branch 6.1.0 \ --recurse-submodules \ https://github.com/input-output-hk/cardano-graphql.git \ && cd cardano-graphql

The issues I received are the following:

1)

ERROR: yaml.scanner.ScannerError: while scanning a plain scalar in "./docker-compose.yml", line 31, column 21 found unexpected ':' in "./docker-compose.yml", line 31, column 57 Please check http://pyyaml.org/wiki/YAMLColonInFlowContext for details.

this stemming I believe

cache_from: [ cardanosolutions/cardano-node-ogmios:latest ]

2) Similarly same issue on

cache_from: [ inputoutput/cardano-graphql:latest ]

3) Also

ERROR: Invalid interpolation format for "environment" option in service "cardano-db-sync-extended": "RESTORE_SNAPSHOT=${RESTORE_SNAPSHOT:-}"

This stemming I believe from

- RESTORE_SNAPSHOT=${RESTORE_SNAPSHOT:-}

I fixed these with few edits to the docker-compose.yml, but before I suggest edits I wanted to get perspective if I am missing something in the docker-compose.yml setup and commands from above.

Thanks!

CyberCyclone commented 2 years ago

Can you please verify that you're running the latest Docker and docker-compose versions?

rajcrypto1980 commented 2 years ago

1) docker

$ docker version Client: Docker Engine - Community Version: 20.10.12 API version: 1.41 Go version: go1.16.12 Git commit: e91ed57 Built: Mon Dec 13 11:45:33 2021 OS/Arch: linux/amd64 Context: default Experimental: true

Server: Docker Engine - Community Engine: Version: 20.10.12 API version: 1.41 (minimum version 1.12) Go version: go1.16.12 Git commit: 459d0df Built: Mon Dec 13 11:43:42 2021 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.4.12 GitCommit: 7b11cfaabd73bb80907dd23182b9347b4245eb5d runc: Version: 1.0.2 GitCommit: v1.0.2-0-g52b36a2 docker-init: Version: 0.19.0 GitCommit: de40ad0

2) docker-compose

$ docker-compose version docker-compose version 1.17.1, build unknown docker-py version: 2.5.1 CPython version: 2.7.17 OpenSSL version: OpenSSL 1.1.1 11 Sep 2018

CyberCyclone commented 2 years ago

I'd say the outdated docker compose is the issue.

I rebuilt a server a few days ago and docker version 20.10.12 and docker-compose 2.2.3 had no issues.

rajcrypto1980 commented 2 years ago

Alright I will upgrade on my end then- thanks!