WIP: custom theme loading #10

Draft
decentral1se wants to merge 2 commits from custom-theme-loading into master
3 changed files with 19 additions and 0 deletions

View File

@ -7,6 +7,10 @@ LETS_ENCRYPT_ENV=production
ADMIN_USERNAME=admin
# CUSTOM_THEME_ENABLED=1
# CUSTOM_THEME_URL=
# CUSTOM_THEME_NAME=
SECRET_DB_ROOT_PASSWORD_VERSION=v1
SECRET_DB_PASSWORD_VERSION=v1
SECRET_ADMIN_PASSWORD_VERSION=v1

View File

@ -9,6 +9,9 @@ services:
- admin_password
- db_password
environment:
- CUSTOM_THEME_ENABLED
- CUSTOM_THEME_NAME
- CUSTOM_THEME_URL
- DB_ADDR=db
- DB_DATABASE=keycloak
- DB_PASSWORD_FILE=/run/secrets/db_password
@ -57,6 +60,7 @@ services:
labels: ["coop-cloud.${STACK_NAME}.db.version=10.6-718cb856"]
networks:
internal:
internal: true
proxy:
external: true
secrets:

11
entrypoint.sh.tmpl Normal file
View File

@ -0,0 +1,11 @@
#!/bin/bash
set -e
{{ if eq (env "CUSTOM_THEME_ENABLED") "1" }}
git clone "$CUSTOM_THEME_URL" "/opt/jboss/keycloak/themes/$CUSTOM_THEME_NAME"
{{ end }}
# upstream entrypoint
# https://github.com/keycloak/keycloak-containers/blob/aa2e5515ccb05116e49ab38839d8fcfdd17c45aa/server/Dockerfile#L30
/usr/local/bin/entrypoint.sh "$@"