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:
+3
-2
@@ -19,9 +19,10 @@ services:
|
|||||||
- "5432:5432"
|
- "5432:5432"
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
||||||
interval: 5s
|
interval: 30s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 3
|
retries: 3
|
||||||
|
start_period: 10s
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
|
|
||||||
@@ -70,7 +71,7 @@ services:
|
|||||||
- bookhoard_conversion_cache:/app/cache/kepub
|
- bookhoard_conversion_cache:/app/cache/kepub
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD-SHELL", "curl -f http://localhost:8765/health || exit 1"]
|
test: ["CMD-SHELL", "curl -f http://localhost:8765/health || exit 1"]
|
||||||
interval: 10s
|
interval: 30s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 3
|
retries: 3
|
||||||
start_period: 10s
|
start_period: 10s
|
||||||
|
|||||||
Reference in New Issue
Block a user