Skip to content

How to add hasura settings to an existing docker-compose.yaml to group it with other related project containers? #7192

Answered by wemersonrv
wemersonrv asked this question in General
Discussion options

You must be logged in to vote

Found it.

  1. Copy the entire graphql-engineblock from original hasura docker-compose.yaml
  2. change the depends_on part to match Postgres service name
  3. Add Network and volume settings matching the other services
  graphql-engine:
    image: hasura/graphql-engine:v2.0.1
    ports:
      - '${FORWARD_HASURA_PORT:-8080}:8080'
    depends_on:
      - "pgsql"
    volumes:
      - 'sailhasura:/data'
    networks:
      - sail
    restart: always
    environment:
      HASURA_GRAPHQL_METADATA_DATABASE_URL: "postgres://${DB_USERNAME}:${DB_PASSWORD}@pgsql:5432/${DB_DATABASE}"
      ## enable the console served by server
      HASURA_GRAPHQL_ENABLE_CONSOLE: "true" # set to "false" to disable console
      

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by wemersonrv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
General
Labels
None yet
1 participant