feat: custom theme loading
This commit is contained in:
parent
b037067a2e
commit
3b9d0237b2
|
@ -7,6 +7,9 @@ LETS_ENCRYPT_ENV=production
|
||||||
|
|
||||||
ADMIN_USERNAME=admin
|
ADMIN_USERNAME=admin
|
||||||
|
|
||||||
|
# CUSTOM_THEME_ENABLED=1
|
||||||
|
# CUSTOM_THEME_URL=
|
||||||
|
|
||||||
SECRET_DB_ROOT_PASSWORD_VERSION=v1
|
SECRET_DB_ROOT_PASSWORD_VERSION=v1
|
||||||
SECRET_DB_PASSWORD_VERSION=v1
|
SECRET_DB_PASSWORD_VERSION=v1
|
||||||
SECRET_ADMIN_PASSWORD_VERSION=v1
|
SECRET_ADMIN_PASSWORD_VERSION=v1
|
||||||
|
|
13
compose.yml
13
compose.yml
|
@ -11,6 +11,8 @@ services:
|
||||||
- admin_password
|
- admin_password
|
||||||
- db_password
|
- db_password
|
||||||
environment:
|
environment:
|
||||||
|
- CUSTOM_THEME_ENABLED
|
||||||
|
- CUSTOM_THEME_URL
|
||||||
- DB_ADDR=db
|
- DB_ADDR=db
|
||||||
- DB_DATABASE=keycloak
|
- DB_DATABASE=keycloak
|
||||||
- DB_PASSWORD_FILE=/run/secrets/db_password
|
- DB_PASSWORD_FILE=/run/secrets/db_password
|
||||||
|
@ -19,6 +21,11 @@ services:
|
||||||
- KEYCLOAK_PASSWORD_FILE=/run/secrets/admin_password
|
- KEYCLOAK_PASSWORD_FILE=/run/secrets/admin_password
|
||||||
- KEYCLOAK_USER=${ADMIN_USERNAME}
|
- KEYCLOAK_USER=${ADMIN_USERNAME}
|
||||||
- PROXY_ADDRESS_FORWARDING=true
|
- PROXY_ADDRESS_FORWARDING=true
|
||||||
|
configs:
|
||||||
|
- source: entrypoint_conf
|
||||||
|
target: /docker-entrypoint.sh
|
||||||
|
mode: 0555
|
||||||
|
entrypoint: /docker-entrypoint.sh
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "curl", "-f", "http://localhost:8080"]
|
test: ["CMD", "curl", "-f", "http://localhost:8080"]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
|
@ -75,3 +82,9 @@ secrets:
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
mariadb:
|
mariadb:
|
||||||
|
|
||||||
|
configs:
|
||||||
|
entrypoint_conf:
|
||||||
|
name: ${STACK_NAME}_entrypoint_conf_${ENTRYPOINT_CONF_VERSION}
|
||||||
|
file: entrypoint.sh.tmpl
|
||||||
|
template_driver: golang
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
{{ if eq (env "CUSTOM_THEME_ENABLED") "1" }}
|
||||||
|
microdnf update && microdnf install git
|
||||||
|
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 "$@"
|
Loading…
Reference in New Issue