diff --git a/keycloak/docker-compose.yml b/keycloak/docker-compose.yml index 1fb6f57..423880a 100644 --- a/keycloak/docker-compose.yml +++ b/keycloak/docker-compose.yml @@ -25,9 +25,12 @@ services: ports: - ${HOST_PORT1}:8080 - ${HOST_PORT2}:8443 + command: start # Use --dev for testing, or 'start' for production healthcheck: - test: [ "CMD", "curl", "-f", "http://localhost:8080/health/ready" ] - interval: 15s - timeout: 2s - retries: 15 + # Use a bash-based socket check if curl is missing + test: ["CMD-SHELL", "timeout 1 bash -c 'cat < /dev/null > /dev/tcp/127.0.0.1/8080' || exit 1"] + interval: 10s + timeout: 5s + retries: 5 + start_period: 30s # Gives Keycloak time to boot before failing it entrypoint: '/opt/keycloak/bin/kc.sh' \ No newline at end of file