necouchman commented on code in PR #1119:
URL: https://github.com/apache/guacamole-client/pull/1119#discussion_r2402569249


##########
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:
   Hmmm....I'm not sure about adding something like this that is known to cause 
problems. I also did a quick look to see if it's possible to do a conditional 
`HEALTHCHECK`, and that didn't turn up anything obvious. Maybe in the `|| exit 
1` portion a conditional statement could be put to check for the status of the 
the variable that enables or disables the health check?
   
   Alternatively, I think maybe the way to go is just not to make it 
configurable and simply enable the Tomcat `HealthCheckValve` always, as you 
suggest.
   
   @mike-jumper Thoughts or preferences?



-- 
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]

Reply via email to