Compare commits

...

2 Commits

Author SHA1 Message Date
3b9d0237b2 feat: custom theme loading
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
2021-10-21 12:55:39 +02:00
b037067a2e chore: new v15 release
Some checks failed
continuous-integration/drone/push Build is failing
2021-10-12 01:07:05 +02:00
4 changed files with 31 additions and 2 deletions

View File

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

1
abra.sh Normal file
View File

@ -0,0 +1 @@
export ENTRYPOINT_CONF_VERSION=v1

View File

@ -3,7 +3,7 @@ version: "3.8"
services:
app:
image: "jboss/keycloak:14.0.0"
image: "jboss/keycloak:15.0.2"
networks:
- proxy
- internal
@ -11,6 +11,8 @@ services:
- admin_password
- db_password
environment:
- CUSTOM_THEME_ENABLED
- CUSTOM_THEME_URL
- DB_ADDR=db
- DB_DATABASE=keycloak
- DB_PASSWORD_FILE=/run/secrets/db_password
@ -19,6 +21,11 @@ services:
- KEYCLOAK_PASSWORD_FILE=/run/secrets/admin_password
- KEYCLOAK_USER=${ADMIN_USERNAME}
- PROXY_ADDRESS_FORWARDING=true
configs:
- source: entrypoint_conf
target: /docker-entrypoint.sh
mode: 0555
entrypoint: /docker-entrypoint.sh
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080"]
interval: 30s
@ -40,7 +47,7 @@ services:
- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirect"
- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLForceHost=true"
- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}"
- "coop-cloud.${STACK_NAME}.version=2.0.0+14.0.0"
- "coop-cloud.${STACK_NAME}.version=3.0.0+15.0.2"
db:
image: "mariadb:10.6"
@ -75,3 +82,9 @@ secrets:
volumes:
mariadb:
configs:
entrypoint_conf:
name: ${STACK_NAME}_entrypoint_conf_${ENTRYPOINT_CONF_VERSION}
file: entrypoint.sh.tmpl
template_driver: golang

12
entrypoint.sh.tmpl Normal file
View File

@ -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 "$@"