add cluster config for external load balancer
This commit is contained in:
parent
8714389c62
commit
9c3afa04ec
2 changed files with 58 additions and 0 deletions
56
.docker-compose.cluster.yml
Normal file
56
.docker-compose.cluster.yml
Normal 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:
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue