-
-
Notifications
You must be signed in to change notification settings - Fork 186
Expand file tree
/
Copy pathdocker-compose.postgres.yml
More file actions
33 lines (33 loc) · 1.29 KB
/
Copy pathdocker-compose.postgres.yml
File metadata and controls
33 lines (33 loc) · 1.29 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
services:
postgres:
image: postgres:18.0
# shared_preload_libraries only takes effect on a restart, not a reload, so an existing
# deployment picks pg_stat_statements up when the upgrade recreates the stack. A second
# library would have to join this one as a quoted comma-separated list, not a second -c.
#
# Only what the product itself needs; sizing belongs to the deployment, which appends it here
# because Compose replaces `command:` wholesale rather than merging it. Appended last on
# purpose: postgres takes the final occurrence of a setting, so a deployment outranks the
# flags above without restating them.
command: >
postgres
-c io_method=worker
-c shared_preload_libraries=pg_stat_statements
${SHELLHUB_POSTGRES_EXTRA_ARGS:-}
restart: unless-stopped
healthcheck:
start_period: 90s
interval: 5s
timeout: 5s
retries: 5
test: ["CMD-SHELL", "pg_isready -U ${SHELLHUB_POSTGRES_USERNAME} -d ${SHELLHUB_POSTGRES_DATABASE}"]
environment:
- POSTGRES_USER=${SHELLHUB_POSTGRES_USERNAME}
- POSTGRES_PASSWORD=${SHELLHUB_POSTGRES_PASSWORD}
- POSTGRES_DB=${SHELLHUB_POSTGRES_DATABASE}
networks:
- shellhub
server:
depends_on:
postgres:
condition: service_healthy