-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
45 lines (45 loc) · 1.26 KB
/
docker-compose.yml
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
version: '3'
services:
db:
image: timescale/timescaledb:latest-pg13
ports:
- "5432:5432"
environment:
POSTGRES_DB: acona_data_warehouse
POSTGRES_USER: acona_admin
POSTGRES_PASSWORD: ${ACONA_ADMIN_PW}
volumes:
- "./pgdata:/var/lib/postgresql/data" # persist data
- "./docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d" # execute sql in here (see https://hub.docker.com/_/postgres)
postgrest:
image: postgrest/postgrest
ports:
- "3000:3000"
links:
- db:db
environment:
PGRST_DB_URI: postgres://acona_admin:${ACONA_ADMIN_PW}@db:5432/acona_data_warehouse
PGRST_DB_SCHEMA: api
PGRST_DB_ANON_ROLE: api_anon #In production this role should not be the same as the one used for the connection
PGRST_JWT_SECRET: ${ACONA_SECRET}
PGRST_PRE_REQUEST: "auth.check_token"
depends_on:
- db
postgrest-proxy:
depends_on:
- postgrest
image: nginx:latest
ports:
- "3001:3001"
volumes:
- "./postgrest-proxy/nginx.conf:/etc/nginx/conf.d/default.conf"
swagger:
image: swaggerapi/swagger-ui
ports:
- "8081:8081"
expose:
- "8081"
depends_on:
- postgrest-proxy
environment:
API_URL: http://localhost:3001/