From f3cacd1b16ab13a1cc0afd0a6d20ab991692c02e Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Mon, 11 May 2026 14:56:53 -0400 Subject: [PATCH] fix(docker): relax healthcheck intervals and add start_period to postgres The postgres container was being healthchecked every 5s which is aggressive for a database, especially on slower machines or under load. The bookhoard service was checked every 10s. - Increase postgres healthcheck interval from 5s to 30s - Add start_period: 10s to postgres to give it time to initialize before healthcheck failures count against retries - Increase bookhoard healthcheck interval from 10s to 30s --- docker-compose.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index f140295..befdfb3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -19,9 +19,10 @@ services: - "5432:5432" healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"] - interval: 5s + interval: 30s timeout: 5s retries: 3 + start_period: 10s env_file: - .env @@ -70,7 +71,7 @@ services: - bookhoard_conversion_cache:/app/cache/kepub healthcheck: test: ["CMD-SHELL", "curl -f http://localhost:8765/health || exit 1"] - interval: 10s + interval: 30s timeout: 5s retries: 3 start_period: 10s