I have simple express js app, postgres db and graphql engine with docker-compose
file like this:
version: '3.9'
services:
server:
build: .
ports:
- '5000:5000'
db:
image: 'postgres'
# ports:
# - '4321:5432'
environment:
POSTGRES_PASSWORD: '123'
POSTGRES_USER: 'docker'
volumes:
- data:/var/lib/postgresql/data
graphql-engine:
image: hasura/graphql-engine:v1.0.0-beta.6
ports:
- "8080:8080"
depends_on:
- "db"
restart: always
environment:
HASURA_GRAPHQL_DATABASE_URL: postgres://docker:123@172.25.0.3:5432/docker # postgres://username:password@hostname:port/dbname
HASURA_GRAPHQL_ENABLE_CONSOLE: "true" # set to "false" to disable console
## uncomment next line to set an admin secret
# HASURA_GRAPHQL_ADMIN_SECRET: myadminsecretkey
volumes:
data:
When I run: docker-compose up --build -d
, then express js app is running, (I can access it at http://localhost:5000
),
postgres also runs, but not sure how to access graphql-hasura
interface. It wont works at: http://localhost:8080/
What I'm missing ?