diff --git a/Dockerfile b/Dockerfile index de073342..29f3f1d1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,10 +16,6 @@ RUN --mount=type=cache,target=/root/.m2 set -x && \ # TODO: Use a builder image for faster startup. e.g. https://www.keycloak.org/server/containers FROM quay.io/keycloak/keycloak:${KEYCLOAK_VERSION} as keycloak_builder -# Enable health and metrics support -ENV KC_HEALTH_ENABLED=true -ENV KC_METRICS_ENABLED=true - # Don't configure a database vendor here as for tests we want to use the dev-file option # ENV KC_DB=postgres diff --git a/docker-compose.yml b/docker-compose.yml index 71bed45d..6d5c9fa6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,3 +8,6 @@ services: - KEYCLOAK_BASE_URL - KEYCLOAK_REALM_NAME - KC_SPI_EVENTS_LISTENER_REDIS_EVENT_LISTENER_REDIS_URL=redis://${REDIS_URL}/0 + healthcheck: + test: timeout 10s bash -c ':> /dev/tcp/localhost/8080' + start_interval: 10s \ No newline at end of file