From 1a2b3b98993c296dafd53a1b0f3bdf7c479f5775 Mon Sep 17 00:00:00 2001 From: Chris Thompson Date: Fri, 28 Jul 2023 17:19:13 -0400 Subject: [PATCH] Add basic health check for db container --- compose.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/compose.yml b/compose.yml index e644456..0000b0a 100644 --- a/compose.yml +++ b/compose.yml @@ -84,6 +84,12 @@ services: - "backupbot.backup.pre-hook=sh -c 'PGPASSWORD=$$(cat $${POSTGRES_PASSWORD_FILE}) pg_dump -U $${POSTGRES_USER} $${POSTGRES_DB} > /tmp/backup.sql'" - "backupbot.backup.post-hook=rm -f /tmp/backup.sql" - "backupbot.backup.path=/tmp/" + healthcheck: + test: "pg_isready" + interval: 30s + timeout: 10s + retries: 5 + start_period: 1m volumes: postgres: codimd_uploads: