-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
56 lines (51 loc) · 1.46 KB
/
Copy pathdocker-compose.yml
File metadata and controls
56 lines (51 loc) · 1.46 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
name: coco-server
services:
postgres:
image: postgres:18-alpine
environment:
POSTGRES_USER: authenticator
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-changeme}
POSTGRES_DB: coco
volumes:
# PG18+ stores data in a version-specific subdirectory; mount the parent.
- postgres-data:/var/lib/postgresql
- ./db/init:/docker-entrypoint-initdb.d:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U authenticator -d coco"]
interval: 5s
timeout: 5s
retries: 10
postgrest:
image: postgrest/postgrest:v14.11
environment:
PGRST_DB_URI: postgres://authenticator:${POSTGRES_PASSWORD:-changeme}@postgres:5432/coco
PGRST_DB_SCHEMAS: public
PGRST_DB_ANON_ROLE: anon
PGRST_SERVER_PORT: 2626
# Embedded into the auto-generated OpenAPI as servers[0].url so
# Swagger UI's "Try it out" hits the right host.
PGRST_OPENAPI_SERVER_PROXY_URI: http://localhost:2626
ports:
- "2626:2626"
depends_on:
postgres:
condition: service_healthy
swagger-ui:
image: swaggerapi/swagger-ui:v5.17.14
environment:
# PostgREST serves its auto-generated OpenAPI at the root path.
SWAGGER_JSON_URL: http://localhost:2626/
ports:
- "2627:8080"
depends_on:
- postgrest
viewer:
image: nginx:alpine
ports:
- "2628:80"
volumes:
- ./viewer:/usr/share/nginx/html:ro
depends_on:
- postgrest
volumes:
postgres-data: