version: '3' services: db: container_name: pg_db build: context: . dockerfile: ./dockerfiles/db/Dockerfile volumes: - ./dockerfiles/db/setup.sql:/docker-entrypoint-initdb.d/setup.sql ports: - 5406:5432 command: - postgres - -c - wal_level=logical - -c - shared_preload_libraries=pg_stat_statements healthcheck: test: ["CMD-SHELL", "PGUSER=postgres", "pg_isready"] interval: 1s timeout: 10s retries: 5 environment: POSTGRES_USER: postgres POSTGRES_PASSWORD: password POSTGRES_DB: graphqldb rest: container_name: pg_postgrest image: postgrest/postgrest:v10.0.0 restart: unless-stopped ports: - 3001:3000 environment: PGRST_DB_URI: postgres://postgres:password@db:5432/graphqldb PGRST_DB_SCHEMA: public PGRST_DB_ANON_ROLE: anon depends_on: - db graphiql: container_name: pg_graphiql image: nginx volumes: - ./dockerfiles/graphiql:/usr/share/nginx/html ports: - 4000:80 depends_on: - rest