config: extra db toegevoegd voor keycloak

This commit is contained in:
Timo De Meyst 2025-04-08 11:33:08 +02:00
parent 64d530236f
commit 4e87c8d819
2 changed files with 21 additions and 2 deletions

View file

@ -42,6 +42,20 @@ services:
networks:
- dwengo-1
keycloak-db:
image: postgres:latest
ports:
- '5441:5442' # Port numbers 10 higher than normal postgres ports
restart: unless-stopped
volumes:
- dwengo_postgres_keycloak:/var/lib/postgresql/keycloak
environment:
POSTGRES_USER: keycloak
POSTGRES_PASSWORD: ChangeMe
POSTGRES_DB: keycloak
networks:
- dwengo-1
idp:
extends:
file: ./compose.yml
@ -50,6 +64,8 @@ services:
command: ['start', '--http-port', '7080', '--https-port', '7443', '--import-realm']
networks:
- dwengo-1
depends_on:
- keycloak-db
labels:
- 'traefik.enable=true'
- 'traefik.http.routers.idp.rule=PathPrefix(`/idp`)'
@ -67,6 +83,10 @@ services:
KC_HTTPS_CERTIFICATE_FILE: '/keycloak/cert.pem'
KC_HTTPS_CERTIFICATE_KEY_FILE: '/keycloak/key.pem'
KC_HTTP_MAX_QUEUED_REQUESTS: 30 # Prevent overload situations by limiting number of requests
KC_DB: 'postgres'
KC_DB_USERNAME: 'keycloak'
KC_DB_PASSWORD: 'ChangeMe'
KC_DB_URL: 'jdbc:postgresql://keycloak-db/keycloak'
reverse-proxy:
image: traefik:v3.3
@ -126,6 +146,7 @@ volumes:
dwengo_grafana_data:
dwengo_letsencrypt:
dwengo_loki_data:
dwengo_postgres_keycloak:
networks:
dwengo-1:

View file

@ -25,8 +25,6 @@ services:
restart: unless-stopped
volumes:
- ./config/idp:/opt/keycloak/data/import
depends_on:
- db
environment:
KC_HOSTNAME: localhost
KC_HOSTNAME_PORT: 7080