-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
39 lines (36 loc) · 906 Bytes
/
compose.yaml
File metadata and controls
39 lines (36 loc) · 906 Bytes
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
services:
db:
image: pgrenderexample-db
environment:
POSTGRES_DB: db
POSTGRES_USER: app_user
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-password}
volumes:
- ./sql:/docker-entrypoint-initdb.d/:ro
- pgdata:/var/lib/postgresql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U app_user -d db"]
interval: 5s
timeout: 5s
retries: 5
rest:
image: postgrest/postgrest
environment:
PGRST_DB_URI: postgres://app_user:${POSTGRES_PASSWORD:-password}@db:5432/db
PGRST_DB_SCHEMA: public
PGRST_DB_ANON_ROLE: anon
PGRST_SERVER_HOST: "0.0.0.0"
PGRST_SERVER_PORT: 3000
depends_on:
db:
condition: service_healthy
nginx:
image: nginx:alpine
ports:
- "${NGINX_PORT:-8082}:80"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- rest
volumes:
pgdata: