Add basic health check for db container

This commit is contained in:
Chris Thompson 2023-07-28 17:19:13 -04:00 committed by Chris (wolcen) Thompson
parent 7159b36272
commit d299d5461d
1 changed files with 6 additions and 0 deletions

View File

@ -87,6 +87,12 @@ services:
backupbot.backup.path: "/tmp/backup/"
backupbot.restore: "true"
backupbot.restore.post-hook: "sh -c 'psql -U $${POSTGRES_USER} -d $${POSTGRES_DB} < ./backup.sql && rm -f ./backup.sql'"
healthcheck:
test: "pg_isready"
interval: 30s
timeout: 10s
retries: 5
start_period: 1m
volumes:
postgres:
codimd_uploads: