From fcf5bade21a1ae9a65c9f7a65125d7e28d4d4aa5 Mon Sep 17 00:00:00 2001 From: Moritz Date: Tue, 16 Jul 2024 17:28:29 +0200 Subject: [PATCH] Add basic health check for db container by @wolcen --- compose.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/compose.yml b/compose.yml index 272e122..879f52f 100644 --- a/compose.yml +++ b/compose.yml @@ -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: