-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
81 lines (77 loc) · 2.17 KB
/
docker-compose.yml
File metadata and controls
81 lines (77 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
services:
# PostgREST for real Hydra database (used for development with real data)
postgrest:
image: "postgrest/postgrest:v14.3"
environment:
# Connect to Hydra CSV database
- PGRST_DB_URI=postgres://postgres:postgres@host.docker.internal:5434/postgres
- PGRST_SERVER_PORT=${PGREST_PORT:-8080}
- PGRST_DB_ANON_ROLE=postgres
- PGRST_DB_SCHEMA=public
- PGRST_DB_AGGREGATES_ENABLED=true
ports:
- "${PGREST_PORT:-8080}:${PGREST_PORT:-8080}"
extra_hosts:
- "host.docker.internal:host-gateway"
profiles:
- hydra
# PostgREST for test database (used for running tests)
postgrest-test:
image: "postgrest/postgrest:v14.0"
environment:
# connect to hydra database-csv
- PGRST_DB_URI=postgres://csvapi:csvapi@postgres-test:5432/csvapi
- p=http://127.0.0.1:8080
- PGRST_SERVER_PORT=8080
- PGRST_DB_ANON_ROLE=csvapi
- PGRST_DB_SCHEMA=csvapi
- PGRST_DB_AGGREGATES_ENABLED=true
ports:
- 8080:8080
depends_on:
- postgres-test
profiles:
- test
# Test database (used for running tests)
postgres-test:
image: "postgres:15"
volumes:
- ./db/initdb/:/docker-entrypoint-initdb.d/
- ./db/tables_index.csv:/tmp/tables_index.csv
- ./db/exceptions.csv:/tmp/exceptions.csv
environment:
- POSTGRES_DB=csvapi
- POSTGRES_USER=csvapi
- POSTGRES_PASSWORD=csvapi
profiles:
- test
# Tabular API (run locally via Docker, uses same Dockerfile as CI)
tabular-api:
build:
context: .
dockerfile: Dockerfile
args:
APP_MODULE: api_tabular.tabular.app:app_factory
ports:
- "8005:8005"
environment:
- PGREST_ENDPOINT=http://postgrest-test:8080
depends_on:
- postgrest-test
profiles:
- test
# Metrics API (run locally via Docker, uses same Dockerfile as CI)
metrics-api:
build:
context: .
dockerfile: Dockerfile
args:
APP_MODULE: api_tabular.metrics.app:app_factory
ports:
- "8006:8005"
environment:
- PGREST_ENDPOINT=http://postgrest-test:8080
depends_on:
- postgrest-test
profiles:
- test