add proper healthcheck for postgres and depends on statement
This commit is contained in:
parent
27893d4695
commit
3f51425bea
@ -2,6 +2,8 @@ version: "3.8"
|
||||
|
||||
services:
|
||||
app:
|
||||
depends_on:
|
||||
- db
|
||||
environment:
|
||||
- GTS_DB_PORT=5432
|
||||
- GTS_DB_TYPE=postgres
|
||||
@ -34,7 +36,12 @@ services:
|
||||
configs:
|
||||
- source: pg_backup
|
||||
target: /pg_backup.sh
|
||||
mode: 0555
|
||||
mode: 555
|
||||
healthcheck:
|
||||
test: [ "CMD-SHELL", "pg_isready" ]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
secrets:
|
||||
db_password:
|
||||
@ -44,6 +51,7 @@ secrets:
|
||||
volumes:
|
||||
db:
|
||||
|
||||
|
||||
configs:
|
||||
pg_backup:
|
||||
name: ${STACK_NAME}_pg_backup_${PG_BACKUP_VERSION}
|
||||
|
Loading…
x
Reference in New Issue
Block a user