ein wenig aufgeräumt
This commit is contained in:
@@ -0,0 +1,136 @@
|
||||
# ===================================================================
|
||||
# Docker Compose - Client Applications
|
||||
# Meldestelle Project - Frontend Components
|
||||
# ===================================================================
|
||||
# Usage:
|
||||
# Mit Services: docker-compose -f docker-compose.yml -f docker-compose.services.yml -f docker-compose.clients.yml up -d
|
||||
# Nur Frontend: docker-compose -f docker-compose.yml -f docker-compose.clients.yml up -d
|
||||
# ===================================================================
|
||||
|
||||
services:
|
||||
# ===================================================================
|
||||
# Web Application (Kotlin Multiplatform)
|
||||
# ===================================================================
|
||||
web-app:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: dockerfiles/clients/web-app/Dockerfile
|
||||
args:
|
||||
CLIENT_PATH: client/common-ui
|
||||
CLIENT_MODULE: web-app
|
||||
CLIENT_NAME: meldestelle-web-app
|
||||
container_name: meldestelle-web-app
|
||||
environment:
|
||||
NODE_ENV: ${NODE_ENV:-production}
|
||||
API_BASE_URL: http://api-gateway:${GATEWAY_PORT:-8081}
|
||||
WS_URL: ws://api-gateway:${GATEWAY_PORT:-8081}/ws
|
||||
APP_TITLE: ${APP_NAME:-Meldestelle}
|
||||
APP_VERSION: ${APP_VERSION:-1.0.0}
|
||||
# Development specific
|
||||
WEBPACK_DEV_SERVER_HOST: 0.0.0.0
|
||||
WEBPACK_DEV_SERVER_PORT: 3000
|
||||
ports:
|
||||
- "3000:3000"
|
||||
depends_on:
|
||||
- api-gateway
|
||||
networks:
|
||||
- meldestelle-network
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "--fail", "http://localhost:3000/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 60s
|
||||
restart: unless-stopped
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.web-app.rule=Host(`localhost`) && PathPrefix(`/`)"
|
||||
- "traefik.http.services.web-app.loadbalancer.server.port=3000"
|
||||
|
||||
# ===================================================================
|
||||
# Auth Server (Custom Keycloak Extension)
|
||||
# ===================================================================
|
||||
auth-server:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: dockerfiles/infrastructure/auth-server/Dockerfile
|
||||
container_name: meldestelle-auth-server
|
||||
environment:
|
||||
SPRING_PROFILES_ACTIVE: ${SPRING_PROFILES_ACTIVE:-dev}
|
||||
SERVER_PORT: ${AUTH_SERVICE_PORT:-8087}
|
||||
KEYCLOAK_SERVER_URL: http://keycloak:8080
|
||||
KEYCLOAK_REALM: meldestelle
|
||||
KEYCLOAK_CLIENT_ID: meldestelle-auth-service
|
||||
KEYCLOAK_CLIENT_SECRET: ${KEYCLOAK_CLIENT_SECRET:-auth-service-secret}
|
||||
DB_HOST: postgres
|
||||
DB_PORT: 5432
|
||||
DB_NAME: ${POSTGRES_DB:-meldestelle}
|
||||
DB_USER: ${POSTGRES_USER:-meldestelle}
|
||||
DB_PASSWORD: ${POSTGRES_PASSWORD:-meldestelle}
|
||||
JWT_SECRET: ${JWT_SECRET:-meldestelle-jwt-secret-key-for-development-change-in-production}
|
||||
JWT_ISSUER: ${JWT_ISSUER:-meldestelle-api}
|
||||
JWT_AUDIENCE: ${JWT_AUDIENCE:-meldestelle-clients}
|
||||
ports:
|
||||
- "${AUTH_SERVICE_PORT:-8087}:${AUTH_SERVICE_PORT:-8087}"
|
||||
depends_on:
|
||||
keycloak:
|
||||
condition: service_healthy
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
networks:
|
||||
- meldestelle-network
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "--fail", "http://localhost:${AUTH_SERVICE_PORT:-8087}/actuator/health"]
|
||||
interval: 15s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
start_period: 30s
|
||||
restart: unless-stopped
|
||||
|
||||
# ===================================================================
|
||||
# Monitoring Server (Custom Grafana Extensions)
|
||||
# ===================================================================
|
||||
monitoring-server:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: dockerfiles/infrastructure/monitoring-server/Dockerfile
|
||||
container_name: meldestelle-monitoring-server
|
||||
environment:
|
||||
SPRING_PROFILES_ACTIVE: ${SPRING_PROFILES_ACTIVE:-dev}
|
||||
SERVER_PORT: 8088
|
||||
GRAFANA_URL: http://grafana:3000
|
||||
PROMETHEUS_URL: http://prometheus:9090
|
||||
GRAFANA_ADMIN_USER: ${GF_SECURITY_ADMIN_USER:-admin}
|
||||
GRAFANA_ADMIN_PASSWORD: ${GF_SECURITY_ADMIN_PASSWORD:-admin}
|
||||
METRICS_AUTH_USERNAME: ${METRICS_AUTH_USERNAME:-admin}
|
||||
METRICS_AUTH_PASSWORD: ${METRICS_AUTH_PASSWORD:-metrics}
|
||||
ports:
|
||||
- "8088:8088"
|
||||
depends_on:
|
||||
- api-gateway
|
||||
networks:
|
||||
- meldestelle-network
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "--fail", "http://localhost:8088/actuator/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 45s
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- monitoring-data:/app/data
|
||||
- ./docker/monitoring:/app/config:ro
|
||||
|
||||
# ===================================================================
|
||||
# Volumes für Client-spezifische Daten
|
||||
# ===================================================================
|
||||
volumes:
|
||||
monitoring-data:
|
||||
driver: local
|
||||
|
||||
# ===================================================================
|
||||
# Networks (external reference to main network)
|
||||
# ===================================================================
|
||||
networks:
|
||||
meldestelle-network:
|
||||
external: true
|
||||
Reference in New Issue
Block a user