-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
47 lines (47 loc) · 1.2 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
46
47
version: "3.9"
services:
web:
image: nginx:alpine
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx/certs/localhost.pem:/etc/ssl/certs/rootCA.crt
- ./nginx/certs/localhost-key.pem:/etc/ssl/private/rootCA.key
- ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf
- ./web/dist:/usr/share/nginx/html:ro
depends_on:
- backend
backend:
image: postgrest/postgrest
environment:
PGRST_DB_URI: "postgres://postgres:${POSTGRES_PASSWORD}@db:5432/postgres"
PGRST_DB_ANON_ROLE: postgres
PGRST_DB_SCHEMA: public
PGRST_OPENAPI_SERVER_PROXY_URI: "https://backend"
depends_on:
db:
condition: service_healthy
db:
image: postgres:alpine
environment:
POSTGRES_PASSWORD: $POSTGRES_PASSWORD
PGDATA: /var/lib/postgresql/data/pgdata
volumes:
- ./db/runtime:/runtime-scripts
- ./db/init:/docker-entry-point-initdb.d
- ./db/data:/var/lib/postgresql/data
healthcheck:
test:
[
"CMD",
"pg_isready",
"-U",
"postgres",
"-d",
"postgres"
]
interval: 2s
timeout: 0.1s
retries: 8
start_period: 0.5s