-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
28 lines (27 loc) · 1022 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
28 lines (27 loc) · 1022 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
services:
postgres:
image: postgres:16-alpine
container_name: openpartner-postgres
ports:
# Host 5433 because 5432 often collides with other local pgs. In-container
# port is still 5432, so connection strings from other containers look normal.
- "5433:5432"
environment:
POSTGRES_USER: openpartner
POSTGRES_PASSWORD: openpartner
POSTGRES_DB: openpartner
# Picked up by ./docker/initdb/10-app-role.sh on first boot to
# provision the openpartner_app RLS-bound role. Leave unset and
# the role is created NOLOGIN (still useful for SET ROLE in
# isolation tests; not for a runtime-app connection).
OPENPARTNER_APP_DB_PASSWORD: ${OPENPARTNER_APP_DB_PASSWORD:-}
volumes:
- openpartner-pg-data:/var/lib/postgresql/data
- ./docker/initdb:/docker-entrypoint-initdb.d:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U openpartner"]
interval: 5s
timeout: 3s
retries: 10
volumes:
openpartner-pg-data: