Add env and secrets

This commit is contained in:
decentral1se 2021-06-11 16:03:03 +02:00
parent b161cfb2e5
commit abd1365a47
No known key found for this signature in database
GPG Key ID: 92DAD76BD9567B8A
2 changed files with 22 additions and 0 deletions

View File

@ -2,3 +2,9 @@ TYPE=keycloak-collective-portal
DOMAIN=keycloak-collective-portal.example.com
LETS_ENCRYPT_ENV=production
KEYCLOAK_DOMAIN=foobar.com
KEYCLOAK_CLIENT_ID=barfoo
SECRET_APP_SECRET_KEY=v1
SECRET_KEYCLOAK_CLIENT_SECRET=v1

View File

@ -25,6 +25,14 @@ services:
app:
image: "decentral1se/keycloak-collective-portal:latest"
environment:
- APP_SECRET_KEY=/run/secrets/app_secret_key
- KEYCLOAK_CLIENT_ID
- KEYCLOAK_CLIENT_SECRET_FILE=/run/secrets/client_secret
- KEYCLOAK_DOMAIN
secrets:
- app_secret_key
- keycloak_client_secret
networks:
- internal
configs:
@ -49,3 +57,11 @@ configs:
name: ${STACK_NAME}_entrypoint_conf_${ENTRYPOINT_CONF_VERSION}
file: entrypoint.sh.tmpl
template_driver: golang
secrets:
app_secret_key:
external: true
name: ${STACK_NAME}_app_secret_key_${SECRET_APP_SECRET_KEY}
keycloak_client_secret:
external: true
name: ${STACK_NAME}_keycloak_client_secret_${SECRET_KEYCLOAK_CLIENT_SECRET}