hasura / hasura/graphql-engine

cli-migrations-v3: delay in starting hasura container in docker-compose setup

Open
#7,463 10 comments 0 reactions 1 assignee Claimed by @scriptonist View on GitHub
c/cli k/bug
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

here is my docker-compose.yml, I was tried for a few days to find a solution to this, but I can not.

```
version: "3.6"
services:
postgres:
image: postgres:12
restart: always
volumes:
- ./db_data:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: postgrespassword
graphql-engine:
image: hasura/graphql-engine:v2.0.7.cli-migrations-v3
env_file:
- ./hasura-server/.env
volumes:
- ./hasura-server/migrations:/hasura-migrations
- ./hasura-server/metadata:/hasura-metadata
ports:
- "8080:8080"
depends_on:
- "postgres"
restart: always
environment:
## postgres database to store Hasura metadata
HASURA_GRAPHQL_METADATA_DATABASE_URL: postgres://postgres:postgrespassword@postgres:5432/postgres
## this env var can be used to add the above postgres database to Hasura as a data source. this can be removed/updated based on your needs
PG_DATABASE_URL: postgres://postgres:postgrespassword@postgres:5432/postgres
## enable the console served by server
HASURA_GRAPHQL_ENABLE_CONSOLE: "true" # set to "false" to disable console
## enable debugging mode. It is recommended to disable this in production
HASURA_GRAPHQL_DEV_MODE: "true"
HASURA_GRAPHQL_ENABLED_LOG_TYPES: startup, http-log, webhook-log, websocket-log, query-log
## uncomment next line to set an admin secret
HASURA_GRAPHQL_ADMIN_SECRET: xxxxxx

HASURA_GRAPHQL_JWT_SECRET: '{"type":"HS384", "key":"3EK6FD+o0+c7tzBNVfjpMkNDi2yARAAKzQlk8O2IKoxQu4nF7EdAh8s3TwpHwrdWT6R"}'
volumes:
db_data:
```

here is my `config.yaml`

```
version: 3
endpoint: http://localhost:8080/
admin_secret: "xxxxxx"
api_paths:
v1_query: v1/query
v2_query: v2/query
v1_metadata: v1/metadata
graphql: v1/graphql
config: v1alpha1/config
pg_dump: v1alpha1/pg_dump
version: v1/version
metadata_directory: metadata
migrations_directory: migrations
seeds_directory: seeds
actions:
kind: synchronous
handler_webhook_baseurl: http://localhost:3000
codegen:
framework: ""
output_dir: ""
```
when I run `docker-compose up -d ` it works fine. but when run `cd hasura-server && hasura console`
i got this error output

`FATA[0001] version check: failed to get version from server: failed making version api call: Get "http://localhost:8080/v1/version": EOF `

anyone, please help?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.