mirror of
https://github.com/orangecoding/fredy.git
synced 2026-06-16 12:31:07 +00:00
Add health check for Docker container (#179)
- Introduced `HealthCheck` in `docker-compose.yml` to monitor container status. - Added a test step to validate container's health using Docker Compose in the GitHub workflow. - Updated `Dockerfile` to include `curl` for health check commands.
This commit is contained in:
committed by
GitHub
parent
a7d0037edd
commit
0ca9c5ae02
@@ -11,5 +11,12 @@ services:
|
||||
- ./conf:/conf
|
||||
- ./db:/db
|
||||
ports:
|
||||
- 9998:9998
|
||||
- "9998:9998"
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
# The container will immediately stop when health check fails after retries
|
||||
test: ["CMD-SHELL", "curl --fail --silent --show-error --max-time 5 http://localhost:9998/ || exit 1"]
|
||||
interval: 120s
|
||||
timeout: 10s
|
||||
retries: 1
|
||||
start_period: 10s
|
||||
|
||||
Reference in New Issue
Block a user