Update Docker & Kubernetes/Docker/Docker Compose/Keycloak.md

This commit is contained in:
2024-07-09 18:22:51 -06:00
parent 2eb3743f66
commit eaeee22189

View File

@ -27,14 +27,14 @@
image: quay.io/keycloak/keycloak:23.0.6 image: quay.io/keycloak/keycloak:23.0.6
command: start command: start
environment: environment:
TZ: America/Denver # (1) TZ: America/Denver
KC_PROXY_ADDRESS_FORWARDING: true # (2) KC_PROXY_ADDRESS_FORWARDING: true
KC_HOSTNAME_STRICT: false KC_HOSTNAME_STRICT: false
KC_HOSTNAME: auth.bunny-lab.io # (3) KC_HOSTNAME: auth.bunny-lab.io
KC_PROXY: edge # (4) KC_PROXY: edge
KC_HTTP_ENABLED: true KC_HTTP_ENABLED: true
KC_DB: postgres KC_DB: postgres
# KC_DB_URL: jdbc:postgresql://postgres/${POSTGRES_DB} # (5) # KC_DB_URL: jdbc:postgresql://postgres/${POSTGRES_DB} #Official documentation says to use this, but its not really necessary.
KC_DB_USERNAME: ${POSTGRES_USER} KC_DB_USERNAME: ${POSTGRES_USER}
KC_DB_PASSWORD: ${POSTGRES_PASSWORD} KC_DB_PASSWORD: ${POSTGRES_PASSWORD}
KC_DB_URL_HOST: postgres KC_DB_URL_HOST: postgres
@ -42,7 +42,7 @@
KC_DB_URL_DATABASE: ${POSTGRES_DB} KC_DB_URL_DATABASE: ${POSTGRES_DB}
KEYCLOAK_ADMIN: ${KEYCLOAK_ADMIN} KEYCLOAK_ADMIN: ${KEYCLOAK_ADMIN}
KEYCLOAK_ADMIN_PASSWORD: ${KEYCLOAK_ADMIN_PASSWORD} KEYCLOAK_ADMIN_PASSWORD: ${KEYCLOAK_ADMIN_PASSWORD}
# KC_HOSTNAME_DEBUG: true # (6) # KC_HOSTNAME_DEBUG: true #If this is enabled, Navigate to https://auth.bunny-lab.io/realms/master/hostname-debug
KC_HEALTH_ENABLED: true KC_HEALTH_ENABLED: true
ports: ports:
- 8080:8080 - 8080:8080
@ -59,6 +59,7 @@
name: docker_network name: docker_network
docker_network: docker_network:
external: true external: true
``` ```
1. This sets the timezone of the Keycloak server to your timezone. This is not really necessary according to the official documentation, however I just like to add it to all of my containers as a baseline environment variable to add 1. This sets the timezone of the Keycloak server to your timezone. This is not really necessary according to the official documentation, however I just like to add it to all of my containers as a baseline environment variable to add