This PR introduces a HEALTHCHECK command and an autoheal label.
The healthcheck script is executed every 10 seconds and verifies that the socat relay is still up. If it's not it marks the container as "unhealthy".
Marking a container as "unhealthy" doesn't do anything on its own, aside from triggering a health_status event. It does, however, allows the user to handle the situation within their system (e.g. Kubernetes can monitor the health of the containers it's running). A simple way to achieve that is by using the willfarrell/autoheal container that can monitor and restart any unhealthy container that's labelled with autoheal.
This PR introduces a HEALTHCHECK command and an
autoheal
label.The healthcheck script is executed every 10 seconds and verifies that the
socat
relay is still up. If it's not it marks the container as "unhealthy".Marking a container as "unhealthy" doesn't do anything on its own, aside from triggering a
health_status
event. It does, however, allows the user to handle the situation within their system (e.g. Kubernetes can monitor the health of the containers it's running). A simple way to achieve that is by using the willfarrell/autoheal container that can monitor and restart any unhealthy container that's labelled withautoheal
.Fixes #3