healthcheck done problem freez dockerfile step 11/25

This commit is contained in:
hamza rahmani 2025-01-14 11:46:48 +01:00
parent e381ab181b
commit 34d30f6af2

View File

@ -31,6 +31,12 @@ services:
- ./acme:/acme
networks:
traefik_net:
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/api/rawdata"]
interval: 30s
retries: 3
start_period: 10s
timeout: 10s
# GATE KEEPER
keycloak-gatekeeper:
@ -52,6 +58,11 @@ services:
entrypoint:
- /opt/keycloak-gatekeeper
- --config=/etc/keycloak-gatekeeper.conf
healthcheck:
test: ['CMD-SHELL', '[ -f /tmp/HealthCheck.java ] || echo "public class HealthCheck { public static void main(String[] args) throws java.lang.Throwable { System.exit(java.net.HttpURLConnection.HTTP_OK == ((java.net.HttpURLConnection)new java.net.URL(args[0]).openConnection()).getResponseCode() ? 0 : 1); } }" > /tmp/HealthCheck.java && java /tmp/HealthCheck.java http://localhost:8080/health/live']
interval: 5s
timeout: 5s
retries: 30
# NETWORKS