From 0b933ed3a233daf11cc0ea38bcc245b6ebdf22e2 Mon Sep 17 00:00:00 2001 From: risk-alt Date: Sat, 8 Aug 2026 17:37:29 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B(keycloak)=20fix=20database=20env?= =?UTF-8?q?=20variables=20in=20the=20self-hosting=20example?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Keycloak container ignored KC_DB_HOST, KC_DB_NAME and KC_DB_USER: the Quarkus distribution expects KC_DB_URL_HOST, KC_DB_URL_DATABASE and KC_DB_USERNAME instead. Keycloak silently fell back to its default JDBC URL on localhost:5432 and could not reach the database container. The host value also pointed to "postgresql" while the service is named kc_postgresql in the example compose file, so it is fixed as well. These names already match the ones used in env.d/development/kc_auth. Signed-off-by: risk-alt --- CHANGELOG.md | 1 + env.d/production.dist/kc_postgresql | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index defbd42f8..86c286a5e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ and this project adheres to - 🐛(backend) ignore CSPs for API docs in development - 🐛(frontend) export images embedded with a relative url #2573 - 🐛(y-provider) fix sentry init #2579 +- 🐛(keycloak) fix database env variables in the self-hosting example #2572 - 🐛(helm) show the database error while jobs wait for it to be ready #2578 ## [v5.4.1] - 2026-07-09 diff --git a/env.d/production.dist/kc_postgresql b/env.d/production.dist/kc_postgresql index 7fa5a2b31..e7a70e933 100644 --- a/env.d/production.dist/kc_postgresql +++ b/env.d/production.dist/kc_postgresql @@ -7,7 +7,7 @@ PGDATA=/var/lib/postgresql/data/pgdata # Keycloak postgresql configuration KC_DB=postgres KC_DB_SCHEMA=public -KC_DB_HOST=postgresql -KC_DB_NAME=${POSTGRES_DB} -KC_DB_USER=${POSTGRES_USER} +KC_DB_URL_HOST=kc_postgresql +KC_DB_URL_DATABASE=${POSTGRES_DB} +KC_DB_USERNAME=${POSTGRES_USER} KC_DB_PASSWORD=${POSTGRES_PASSWORD} \ No newline at end of file