From 2e3a6909d0cdb7ad168f918b62bae1f1724fdff4 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 21 Nov 2024 11:52:37 +0100 Subject: [PATCH] Update quay.io/keycloak/keycloak Docker tag to v26 (#330) * Update quay.io/keycloak/keycloak Docker tag to v26 * Fix healthcheck for keycloak 26 The healthcheck was failing for two reasons: 1. --health-enabled now defaults to false 2. It validates HTTP requests more strictly. Thus a bug in the GET request from healthcheck.sh was successful in 25.0 but gave a 400 response in 26.0 --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Spencer Bliven --- services/backend/services/keycloak/compose.base.yaml | 4 ++-- services/backend/services/keycloak/healthcheck/healthcheck.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/services/backend/services/keycloak/compose.base.yaml b/services/backend/services/keycloak/compose.base.yaml index 59c0984e..8e6cadff 100644 --- a/services/backend/services/keycloak/compose.base.yaml +++ b/services/backend/services/keycloak/compose.base.yaml @@ -1,7 +1,7 @@ services: keycloak: - image: quay.io/keycloak/keycloak:25.0 - command: start-dev --import-realm --http-port=80 + image: quay.io/keycloak/keycloak:26.0 + command: start-dev --import-realm --health-enabled=true --http-port=80 env_file: ./config/.env volumes: - ./healthcheck/healthcheck.sh:/healthcheck.sh diff --git a/services/backend/services/keycloak/healthcheck/healthcheck.sh b/services/backend/services/keycloak/healthcheck/healthcheck.sh index c40baf18..b66a8a59 100755 --- a/services/backend/services/keycloak/healthcheck/healthcheck.sh +++ b/services/backend/services/keycloak/healthcheck/healthcheck.sh @@ -4,7 +4,7 @@ if ! exec 3<>/dev/tcp/localhost/9000; then exit 1 fi -printf "GET /health/ready HTTP/1.1\r\nHost: localhostConnection: close\r\n\r\n" >&3 +printf "GET /health/ready HTTP/1.1\r\nHost: localhost\r\nConnection: close\r\n\r\n" >&3 timeout --preserve-status 5 grep -m 1 "UP" <&3 exit_status=$? exec 3>&-