This commit is contained in:
parent
46d17a617d
commit
acb96d8afe
1 changed files with 6 additions and 1 deletions
|
|
@ -16,12 +16,17 @@ services:
|
||||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?set POSTGRES_PASSWORD in the stack}
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?set POSTGRES_PASSWORD in the stack}
|
||||||
POSTGRES_DB: vmselector
|
POSTGRES_DB: vmselector
|
||||||
volumes:
|
volumes:
|
||||||
- db_data:/var/lib/postgresql/data
|
# Postgres 18 moved PGDATA to /var/lib/postgresql/18/docker and its declared
|
||||||
|
# VOLUME to /var/lib/postgresql. Mounting the pre-18 /var/lib/postgresql/data
|
||||||
|
# leaves the real data outside the volume, and trips the entrypoint.
|
||||||
|
- db_data:/var/lib/postgresql
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ['CMD-SHELL', 'pg_isready -U postgres -d vmselector']
|
test: ['CMD-SHELL', 'pg_isready -U postgres -d vmselector']
|
||||||
interval: 5s
|
interval: 5s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 10
|
retries: 10
|
||||||
|
# initdb runs on the very first boot: do not count failures before it is done
|
||||||
|
start_period: 30s
|
||||||
networks: [internal]
|
networks: [internal]
|
||||||
|
|
||||||
# Runs once per deployment, before the app: applies any new migration, then exits
|
# Runs once per deployment, before the app: applies any new migration, then exits
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue