add cluster config for external load balancer

This commit is contained in:
holzi1005 2024-12-09 08:58:26 +01:00
parent 8714389c62
commit 9c3afa04ec
2 changed files with 58 additions and 0 deletions

View file

@ -0,0 +1,56 @@
version: '3.8'
services:
#Here is the ODC app
app-odc:
image: git.h2-invent.com/datenschutzcenter/application:3.0.5
depends_on:
db-odc:
condition: service_healthy
restart: unless-stopped
env_file:
- ./.env.local
- ./.env.custom
ports:
- 8080:8080
extra_hosts:
- "<clientUrl>:<hostIp>"
volumes:
- datenschutzcenter_uploads:/var/www/html/public/uploads:rw
- datenschutzcenter_secret_storage:/var/www/html/secretStorage:rw
- datenschutzcenter_data:/var/www/html/data:rw
db-odc:
image: mariadb:latest
hostname: db-odc
healthcheck:
test: [ "CMD", "mariadb-admin" ,"ping", "-h", "localhost","-ptest" ]
timeout: 20s
retries: 10
restart: unless-stopped
environment:
MARIADB_ROOT_PASSWORD: test
volumes:
- mariadb:/var/lib/mysql
- ./mysql-initdb:/docker-entrypoint-initdb.d
keycloak-odc:
image: quay.io/keycloak/keycloak:22.0.3
depends_on:
db-odc:
condition: service_healthy
env_file:
- ./.env.local
- ./.env.custom
ports:
- 8080:8080
command:
- start-dev
- --import-realm
volumes:
- ./keycloak/:/opt/keycloak/data/import
volumes:
mariadb:
datenschutzcenter_uploads:
datenschutzcenter_data:
datenschutzcenter_secret_storage:

View file

@ -24,6 +24,7 @@ services:
restart: unless-stopped
env_file:
- ./.env.local
- ./.env.custom
labels:
- "traefik.enable=true"
- "traefik.http.routers.app-odc.rule=Host(`<clientUrl>`)"
@ -55,6 +56,7 @@ services:
condition: service_healthy
env_file:
- ./.env.local
- ./.env.custom
command:
- start-dev
- --import-realm