dmunozv04 commented on code in PR #1119:
URL: https://github.com/apache/guacamole-client/pull/1119#discussion_r2401853889
##########
Dockerfile:
##########
@@ -99,8 +99,11 @@ USER guacamole
# Environment variable defaults
ENV BAN_ENABLED=true \
ENABLE_FILE_ENVIRONMENT_PROPERTIES=true \
- GUACAMOLE_HOME=/etc/guacamole
+ GUACAMOLE_HOME=/etc/guacamole \
+ HEALTH_CHECK_VALVE_ENABLED=true
# Start Guacamole under Tomcat, listening on 0.0.0.0:8080
EXPOSE 8080
+HEALTHCHECK --interval=60s --timeout=10s --start-period=30s \
+ CMD curl --fail --silent --show-error http://localhost:8080/health || exit
1
Review Comment:
Docker will show the container as `Up About a minute (health: starting)` and
after the start-period it'll show it as `Up 3 minutes (unhealthy)`
This health status is just a visual indication, but will not cause the
container to fail.
However, it looks like docker swarm will attempt to restart an unhealthy
container to try to get it running
([source](https://statusq.org/archives/2022/02/01/10830/)), and
[Podman](https://www.redhat.com/en/blog/podman-edge-healthcheck) can be
configured to restart, stop or kill an unhealthy container.
Kubernetes just ignores this HEALTHCHECK and relies on its own
[probes](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/)
Considering this, and the low impact of having an http route that just
replies with `200 OK`, maybe it could be better to always force the health
check to enabled or not have it set on the Dockerfile like it's been until now.
I don't know what option is better
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]