Add basic health check for db container

by @wolcen
This commit is contained in:
Moritz 2024-07-16 17:28:29 +02:00
parent 3fc480b82b
commit fcf5bade21

View File

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