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
This commit is contained in:
2026-05-11 14:56:53 -04:00
parent b829b7fe22
commit f3cacd1b16
+3 -2
View File
@@ -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