Docker-Compose/.docker-compose.http.yml

76 lines
2 KiB
YAML
Raw Normal View History

2024-12-07 22:18:01 +01:00
version: '3.8'
services:
traefik-odc:
image: "traefik:v2.5"
command:
2024-12-08 07:17:28 +01:00
# - "--log.level=DEBUG"
2024-12-07 23:18:06 +01:00
- "--api.insecure=true"
2024-12-07 22:18:01 +01:00
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
2024-12-07 23:18:06 +01:00
- "--entrypoints.web.address=:80"
2024-12-07 22:18:01 +01:00
ports:
- "80:80"
- "443:443"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
#Here is the ODC app
app-odc:
2024-12-11 17:17:51 +01:00
image: git.h2-invent.com/datenschutzcenter/application:<version>
2024-12-07 22:18:01 +01:00
depends_on:
db-odc:
condition: service_healthy
restart: unless-stopped
2024-12-08 18:39:50 +01:00
env_file:
- ./.env.local
- ./.env.custom
2024-12-07 22:18:01 +01:00
labels:
- "traefik.enable=true"
2024-12-07 22:30:24 +01:00
- "traefik.http.routers.app-odc.rule=Host(`<clientUrl>`)"
2024-12-07 22:18:01 +01:00
- "traefik.http.routers.app-odc.entrypoints=web"
2024-12-08 07:17:28 +01:00
extra_hosts:
- "<clientUrl>:<hostIp>"
2024-12-07 22:18:01 +01:00
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
2024-12-07 22:30:24 +01:00
hostname: db-odc
2024-12-07 22:18:01 +01:00
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
2024-12-08 15:57:30 +01:00
depends_on:
db-odc:
condition: service_healthy
2024-12-08 18:39:50 +01:00
env_file:
- ./.env.local
- ./.env.custom
2024-12-07 22:18:01 +01:00
command:
- start-dev
- --import-realm
labels:
- "traefik.enable=true"
2024-12-07 22:30:24 +01:00
- "traefik.http.routers.keycloak-odc.rule=Host(`<clientUrl>`) && PathPrefix(`/keycloak`)"
2024-12-07 22:18:01 +01:00
- "traefik.http.routers.keycloak-odc.entrypoints=web"
- "traefik.http.services.keycloak-odc.loadbalancer.server.port=8080"
volumes:
- ./keycloak/:/opt/keycloak/data/import
volumes:
mariadb:
datenschutzcenter_uploads:
datenschutzcenter_data:
datenschutzcenter_secret_storage: