Тип сервиса
Сервис Keycloak (buildable)
Сервис учётных записей Keycloak, собранный из вашего Git-репозитория с вашими темами и собственными jar-провайдерами, с хранением данных в связанном PostgreSQL.
Этот сервис запускает ваш код: его образ собирается из Git-репозитория, а каждая сборка развёртывается в окружение.
В StackMaster
Как Keycloak (buildable) работает в StackMaster
quay.io/keycloak/keycloak image in production mode (start). Configuration is passed as KC_* environment variables.Linked services
| Link | Variables |
|---|---|
| PostgreSQL (required) | KC_DB_URL_HOST, KC_DB_URL_PORT, KC_DB_URL_DATABASE, KC_DB_USERNAME, KC_DB_PASSWORD |
KC_DB is set to postgres. All Keycloak data is in that database: the service has no volume.
What the manifest sets
KC_HOSTNAMEis the service's URL in the environment. Keycloak uses it for the addresses it issues, such as token issuers and redirects.- TLS ends at Wodby's router:
KC_HTTP_ENABLEDistrueandKC_PROXY_HEADERSisxforwarded. KC_HEALTH_ENABLEDandKC_METRICS_ENABLEDaretrue. Health and metrics are served on the management port 9000, which is private; the application port is 8080.
First administrator
KC_BOOTSTRAP_ADMIN_USERNAME and KC_BOOTSTRAP_ADMIN_PASSWORD come from the service tokens admin_username and admin_password. Keycloak uses them only when it creates the master realm, on the first start with an empty database, and marks the account as temporary. Changing the tokens later does not change an existing account.
Changing configuration
Add or change KC_* environment variables on the service and deploy it. Environment variables take precedence over conf/keycloak.conf, which is not on a volume. Realms, clients and users are managed in the administration console or its API and stored in the database.
Check the result
From inside the environment, /health/ready on port 9000 is the readiness endpoint the service itself is probed with.
Buildable Keycloak on Wodby
This service is the keycloak service built from the app's repository: its guidance applies to settings, the database, the administrator, the hostname and health checks. This page covers what differs.
Image
The image is built from the app's Git repository on top of the same official Keycloak image the keycloak service runs, so the service's versions are Keycloak versions. Start the repository from the Keycloak boilerplate. The build adds:
providers/*.jar: custom providers (SPIs), such as authenticators, user storage, event listeners or protocol mappers, copied to/opt/keycloak/providers;themes/<name>/: themes, with one directory per type (login,account,email,admin) holding itstheme.properties, copied to/opt/keycloak/themes.
The build fails when a theme has the name of one of Keycloak's own themes (base, keycloak, keycloak.v2) or has no theme.properties. It then runs kc.sh build with the service's build-time options (PostgreSQL, health and metrics endpoints), so the container starts without rebuilding Keycloak.
Keycloak's version comes from the service version and the image, not from the repository: providers must support it.
Themes
Select a theme for a realm in Keycloak's administration console, under Realm settings > Themes. Themes are part of the image, so changes reach Keycloak with the next deployment.
Обзор
Технический профиль Keycloak (buildable)
Версии
Основан на
Репозиторий исходного кода
Публичный Helm-чарт
Стеки
Стеки, в которые входит Keycloak (buildable)
CI/CD
Сборка Keycloak (buildable) из Git-репозитория
Vanilla Keycloak
Используйте его как есть или клонируйте в свой Git-аккаунт.
wodby/keycloak-boilerplateCI-провайдеры
StackMaster CI встроен в платформу: пайплайн описывается в файле .wodby/pipeline.yml в репозитории. Для подключённого репозитория те же шаги может выполнять внешний CI-провайдер с помощью StackMaster CLI.
Реестры контейнеров
Собранные образы по умолчанию попадают в StackMaster Registry или во внешний реестр, подключённый как интеграция.
Переменные окружения из интеграций
Интеграция с переменными один раз сохраняет учётные данные стороннего сервиса. Подключите её к Keycloak (buildable), и StackMaster передаст их в контейнер как переменные окружения во время работы, а не при сборке образа.
Конфигурация
Конфигурация сервиса Keycloak (buildable)
Технические домены
Связи сервиса
Каждая связь — это подключение Keycloak (buildable) к другому сервису. На какой сервис указывает связь, задаёт стек. На карточках перечислены публичные сервисы, которые подходят для каждой связи.
postgres
Сервисы, которые подходят для этой связи