ofelia
ofelia copied to clipboard
docker health check
include docker health check
https://github.com/docker/go-healthcheck
Any suggestions for any potential PR on this health check for the daemon? How about adding a command status to ofelia?
As there is still no healthcheck provided for the docker container (not as part of Dockerfile, and not for docker-compose service definition), here is my own version. Feel free to provide your feedback in the comments and propose better timings or even better ideas for the command.
The idea of this healthcheck command is to at least make sure that the container is alive, the Ofelia binary is functional in general, and the config is fine. I understand that it doesn't check the running Ofelia daemon health. Maybe I'll add some internal job to the Ofelia config and then will monitor the result of that job by healthcheck command in the future, but here is my current version for docker-compose:
healthcheck:
test: /usr/bin/ofelia validate --config=/etc/ofelia/config.ini > /dev/null
interval: 5m
timeout: 5s
retries: 5
start_period: 2m