add healthcheck for postgres
This commit is contained in:
parent
a7ffcfc393
commit
af04386ec3
@ -26,6 +26,12 @@ services:
|
||||
- /sprint-data/postgres-data:/var/lib/postgresql/data
|
||||
environment:
|
||||
POSTGRES_PASSWORD: $DB_PASSWORD_DEV
|
||||
healthcheck:
|
||||
test: pg_isready || pg_resetwal /var/lib/postgresql/data
|
||||
interval: 60s
|
||||
retries: 5
|
||||
start_period: 20s
|
||||
timeout: 10s
|
||||
ports:
|
||||
- "5432:5432"
|
||||
deploy:
|
||||
|
@ -26,6 +26,12 @@ services:
|
||||
- /sprint-data/postgres-data:/var/lib/postgresql/data
|
||||
environment:
|
||||
POSTGRES_PASSWORD: $DB_PASSWORD_PROD
|
||||
healthcheck:
|
||||
test: pg_isready || pg_resetwal /var/lib/postgresql/data
|
||||
interval: 60s
|
||||
retries: 5
|
||||
start_period: 20s
|
||||
timeout: 10s
|
||||
ports:
|
||||
- "5432:5432"
|
||||
deploy:
|
||||
|
Loading…
Reference in New Issue
Block a user