cod4-docker icon indicating copy to clipboard operation
cod4-docker copied to clipboard

Add Healthcheck

Open Freekers opened this issue 4 years ago • 1 comments

Perhaps you might be interested in the Healthcheck I added to my image. It checks if the COD4 server is still up/responding by sending 'getinfo' via RCON (using netcat) to the server every 30 seconds. If for some reason the container would still run, but the healthcheck fails (e.g. the CoD4 server process is frozen), the Docker container will be marked as 'unhealthy'. Using a Docker image called 'autoheal' it will automatically restart the container.

Since our repos are too far apart, I cannot do a proper pull request, but feel free to copy the bits you need from my fork :)

Freekers avatar Apr 27 '20 13:04 Freekers

Yes that's definitely something I wanted to add next :wink: Thanks!

qdm12 avatar Apr 27 '20 14:04 qdm12