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

This commit is contained in:
2024-07-14 18:20:56 -06:00
parent 53bbbf5bfe
commit 1896a56805

View File

@ -37,11 +37,11 @@
- /srv/containers/keycloak/themes:/opt/keycloak/themes - /srv/containers/keycloak/themes:/opt/keycloak/themes
- /srv/containers/keycloak/base-theme:/opt/keycloak/themes/base - /srv/containers/keycloak/base-theme:/opt/keycloak/themes/base
environment: environment:
TZ: America/Denver TZ: America/Denver # (1)
KC_PROXY_ADDRESS_FORWARDING: true KC_PROXY_ADDRESS_FORWARDING: true # (2)
KC_HOSTNAME_STRICT: false KC_HOSTNAME_STRICT: false
KC_HOSTNAME: auth.bunny-lab.io KC_HOSTNAME: auth.bunny-lab.io # (3)
KC_PROXY: edge KC_PROXY: edge # (4)
KC_HTTP_ENABLED: true KC_HTTP_ENABLED: true
KC_DB: postgres KC_DB: postgres
KC_DB_USERNAME: ${POSTGRES_USER} KC_DB_USERNAME: ${POSTGRES_USER}
@ -53,11 +53,12 @@
KEYCLOAK_ADMIN: ${KEYCLOAK_ADMIN} KEYCLOAK_ADMIN: ${KEYCLOAK_ADMIN}
KEYCLOAK_ADMIN_PASSWORD: ${KEYCLOAK_ADMIN_PASSWORD} KEYCLOAK_ADMIN_PASSWORD: ${KEYCLOAK_ADMIN_PASSWORD}
KC_HEALTH_ENABLED: true KC_HEALTH_ENABLED: true
DB_POOL_MAX_SIZE: 20 # Maximum connections in the pool DB_POOL_MAX_SIZE: 20 # (6)
DB_POOL_MIN_SIZE: 5 # Minimum idle connections in the pool DB_POOL_MIN_SIZE: 5 # (7)
DB_POOL_ACQUISITION_TIMEOUT: 30 # Timeout for acquiring a connection from the pool DB_POOL_ACQUISITION_TIMEOUT: 30 # (8)
DB_POOL_IDLE_TIMEOUT: 300 # Timeout for closing idle connections DB_POOL_IDLE_TIMEOUT: 300 # (9)
JDBC_PARAMS: "connectTimeout=30" # Timeout for establishing a new database connection JDBC_PARAMS: "connectTimeout=30" # (10)
# KC_HOSTNAME_DEBUG: true # (5)
ports: ports:
- 8080:8080 - 8080:8080
restart: always restart: always
@ -93,8 +94,12 @@
2. This assumes you are running Keycloak behind a reverse proxy, in my particular case, Traefik 2. This assumes you are running Keycloak behind a reverse proxy, in my particular case, Traefik
3. Set this to the FQDN that you are expecting to reach the Keycloak server at behind your reverse proxy 3. Set this to the FQDN that you are expecting to reach the Keycloak server at behind your reverse proxy
4. This assumes you are running Keycloak behind a reverse proxy, in my particular case, Traefik 4. This assumes you are running Keycloak behind a reverse proxy, in my particular case, Traefik
5. Official documentation says to use this, but its not really necessary. In this particular deployment method, we will just specify the parameters manually seen in the next few variables below this one 5. If this is enabled, Navigate to https://auth.bunny-lab.io/realms/master/hostname-debug to troubleshoot issues with the deployment if you experience any issues logging into the web portal or admin UI
6. If this is enabled, Navigate to https://auth.bunny-lab.io/realms/master/hostname-debug to troubleshoot issues with the deployment if you experience any issues logging into the web portal or admin UI 6. Maximum connections in the database pool
7. Minimum idle connections in the database pool
8. Timeout for acquiring a connection from the database pool
9. Timeout for closing idle connections to the database
10. Timeout for establishing a new database connection
=== ".env" === ".env"