-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
64 lines (61 loc) · 2.17 KB
/
Copy pathcompose.yaml
File metadata and controls
64 lines (61 loc) · 2.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Local development stack: Postgres with pdbq's fixture schema, pdbq serving
# GraphQL, and gqlgate exposing it as REST. Run from the repo root:
#
# docker compose up
#
# No ports are published here — create a compose.override.yaml (gitignored,
# picked up automatically) mapping them to whatever fits your local setup.
services:
db:
# PostGIS-enabled image so the fixture schema's spatial table works.
image: postgis/postgis:16-3.4
environment:
POSTGRES_USER: pdbq
POSTGRES_PASSWORD: pdbq
POSTGRES_DB: pdbq
volumes:
- ./db/init:/docker-entrypoint-initdb.d:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U pdbq"]
interval: 2s
timeout: 2s
retries: 15
pdbq:
image: ghcr.io/suprbdev/pdbq:latest
depends_on:
db:
condition: service_healthy
environment:
PDBQ_DATABASE_URL: postgres://pdbq:pdbq@db:5432/pdbq
PDBQ_RLS_ENABLED: "false" # dev stack; see pdbq's docs/rls.md for production
PDBQ_SERVER_GRAPHIQL: "true"
PDBQ_ERRORS_DETAIL: dev
PDBQ_LOG_LEVEL: info
gqlgate:
image: suprbdev/gqlgate:latest
build:
context: .
depends_on:
- pdbq
environment:
GQLGATE_UPSTREAM_URL: http://pdbq:8080
# Empty introspects pdbq at boot; pdbq's watch mode plus SIGHUP or
# GQLGATE_SCHEMA_POLL__INTERVAL keeps the routes current.
GQLGATE_SCHEMA_PATH: ""
GQLGATE_LOG_LEVEL: debug
GQLGATE_SERVER_OPENAPI_TITLE: "gqlgate over pdbq"
# Scalar runs in the browser, so both of these are *host* URLs: the
# browser cannot resolve a compose service name. They must agree with the
# ports published in compose.override.yaml, so both are driven from .env
# rather than written twice.
GQLGATE_SERVER_OPENAPI_SERVER__URL: http://localhost:${GQLGATE_PORT:-8081}
# Let the Scalar origin call the data endpoints, not merely read the
# document.
GQLGATE_SERVER_CORS__ORIGINS: http://localhost:${SCALAR_PORT:-8082}
scalar:
image: scalarapi/api-reference:latest
depends_on:
- gqlgate
environment:
API_REFERENCE_CONFIG: >-
{"url":"http://localhost:${GQLGATE_PORT:-8081}/openapi.json"}