refactoring
This commit is contained in:
+166
-162
@@ -8,181 +8,181 @@
|
||||
# ===================================================================
|
||||
|
||||
services:
|
||||
# ===================================================================
|
||||
# Web Application (Compose for Web)
|
||||
# ===================================================================
|
||||
web-app:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: dockerfiles/clients/web-app/Dockerfile
|
||||
args:
|
||||
# Global build arguments (from docker/build-args/global.env)
|
||||
GRADLE_VERSION: ${DOCKER_GRADLE_VERSION:-9.0.0}
|
||||
JAVA_VERSION: ${DOCKER_JAVA_VERSION:-21}
|
||||
BUILD_DATE: ${BUILD_DATE}
|
||||
VERSION: ${DOCKER_APP_VERSION:-1.0.0}
|
||||
# Client-specific arguments (from docker/build-args/clients.env)
|
||||
NODE_VERSION: ${DOCKER_NODE_VERSION:-20.11.0}
|
||||
NGINX_VERSION: ${DOCKER_NGINX_VERSION:-1.25-alpine}
|
||||
# Application-specific arguments
|
||||
CLIENT_PATH: client
|
||||
CLIENT_MODULE: client
|
||||
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: 4000
|
||||
ports:
|
||||
- "4000:4000"
|
||||
networks:
|
||||
- meldestelle-network
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "--fail", "http://localhost:4000/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=4000"
|
||||
# ===================================================================
|
||||
# Web Application (Compose for Web)
|
||||
# ===================================================================
|
||||
web-app:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: dockerfiles/clients/web-app/Dockerfile
|
||||
args:
|
||||
# Global build arguments (from docker/build-args/global.env)
|
||||
GRADLE_VERSION: ${DOCKER_GRADLE_VERSION:-9.0.0}
|
||||
JAVA_VERSION: ${DOCKER_JAVA_VERSION:-21}
|
||||
BUILD_DATE: ${BUILD_DATE}
|
||||
VERSION: ${DOCKER_APP_VERSION:-1.0.0}
|
||||
# Client-specific arguments (from docker/build-args/clients.env)
|
||||
NODE_VERSION: ${DOCKER_NODE_VERSION:-20.11.0}
|
||||
NGINX_VERSION: ${DOCKER_NGINX_VERSION:-1.25-alpine}
|
||||
# Application-specific arguments
|
||||
CLIENT_PATH: client
|
||||
CLIENT_MODULE: client
|
||||
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: 4000
|
||||
ports:
|
||||
- "4000:4000"
|
||||
networks:
|
||||
- meldestelle-network
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "--fail", "http://localhost:4000/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=4000"
|
||||
|
||||
# ===================================================================
|
||||
# Desktop Application (Compose Desktop with VNC)
|
||||
# ===================================================================
|
||||
desktop-app:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: dockerfiles/clients/desktop-app/Dockerfile
|
||||
args:
|
||||
# Global build arguments (from docker/build-args/global.env)
|
||||
GRADLE_VERSION: ${DOCKER_GRADLE_VERSION:-9.0.0}
|
||||
JAVA_VERSION: ${DOCKER_JAVA_VERSION:-21}
|
||||
BUILD_DATE: ${BUILD_DATE}
|
||||
VERSION: ${DOCKER_APP_VERSION:-1.0.0}
|
||||
# Client-specific arguments (from docker/build-args/clients.env)
|
||||
NODE_VERSION: ${DOCKER_NODE_VERSION:-20.11.0}
|
||||
# Application-specific arguments
|
||||
CLIENT_PATH: client
|
||||
CLIENT_MODULE: client
|
||||
CLIENT_NAME: meldestelle-desktop-app
|
||||
container_name: meldestelle-desktop-app
|
||||
environment:
|
||||
NODE_ENV: ${NODE_ENV:-production}
|
||||
API_BASE_URL: http://api-gateway:${GATEWAY_PORT:-8081}
|
||||
APP_TITLE: ${APP_NAME:-Meldestelle}
|
||||
APP_VERSION: ${APP_VERSION:-1.0.0}
|
||||
# VNC Configuration
|
||||
DISPLAY: ":99"
|
||||
VNC_PORT: "5901"
|
||||
NOVNC_PORT: "6080"
|
||||
ports:
|
||||
- "6080:6080" # Web-based VNC (noVNC)
|
||||
- "5901:5901" # VNC direct access
|
||||
networks:
|
||||
- meldestelle-network
|
||||
healthcheck:
|
||||
test: ["CMD", "/opt/health-check.sh"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 60s
|
||||
restart: unless-stopped
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.desktop-app.rule=Host(`localhost`) && PathPrefix(`/desktop`)"
|
||||
- "traefik.http.services.desktop-app.loadbalancer.server.port=6080"
|
||||
# desktop-app:
|
||||
# build:
|
||||
# context: .
|
||||
# dockerfile: dockerfiles/clients/desktop-app/Dockerfile
|
||||
# args:
|
||||
# # Global build arguments (from docker/build-args/global.env)
|
||||
# GRADLE_VERSION: ${DOCKER_GRADLE_VERSION:-9.0.0}
|
||||
# JAVA_VERSION: ${DOCKER_JAVA_VERSION:-21}
|
||||
# BUILD_DATE: ${BUILD_DATE}
|
||||
# VERSION: ${DOCKER_APP_VERSION:-1.0.0}
|
||||
# # Client-specific arguments (from docker/build-args/clients.env)
|
||||
# NODE_VERSION: ${DOCKER_NODE_VERSION:-20.11.0}
|
||||
# # Application-specific arguments
|
||||
# CLIENT_PATH: client
|
||||
# CLIENT_MODULE: client
|
||||
# CLIENT_NAME: meldestelle-desktop-app
|
||||
# container_name: meldestelle-desktop-app
|
||||
# environment:
|
||||
# NODE_ENV: ${NODE_ENV:-production}
|
||||
# API_BASE_URL: http://api-gateway:${GATEWAY_PORT:-8081}
|
||||
# APP_TITLE: ${APP_NAME:-Meldestelle}
|
||||
# APP_VERSION: ${APP_VERSION:-1.0.0}
|
||||
# # VNC Configuration
|
||||
# DISPLAY: ":99"
|
||||
# VNC_PORT: "5901"
|
||||
# NOVNC_PORT: "6080"
|
||||
# ports:
|
||||
# - "6080:6080" # Web-based VNC (noVNC)
|
||||
# - "5901:5901" # VNC direct access
|
||||
# networks:
|
||||
# - meldestelle-network
|
||||
# healthcheck:
|
||||
# test: [ "CMD", "/opt/health-check.sh" ]
|
||||
# interval: 30s
|
||||
# timeout: 10s
|
||||
# retries: 3
|
||||
# start_period: 60s
|
||||
# restart: unless-stopped
|
||||
# labels:
|
||||
# - "traefik.enable=true"
|
||||
# - "traefik.http.routers.desktop-app.rule=Host(`localhost`) && PathPrefix(`/desktop`)"
|
||||
# - "traefik.http.services.desktop-app.loadbalancer.server.port=6080"
|
||||
|
||||
|
||||
# ===================================================================
|
||||
# Auth Server (Custom Keycloak Extension)
|
||||
# ===================================================================
|
||||
auth-server:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: dockerfiles/infrastructure/auth-server/Dockerfile
|
||||
args:
|
||||
# Global build arguments (from docker/build-args/global.env)
|
||||
GRADLE_VERSION: ${DOCKER_GRADLE_VERSION:-9.0.0}
|
||||
JAVA_VERSION: ${DOCKER_JAVA_VERSION:-21}
|
||||
BUILD_DATE: ${BUILD_DATE}
|
||||
VERSION: ${DOCKER_APP_VERSION:-1.0.0}
|
||||
# Infrastructure-specific arguments (from docker/build-args/infrastructure.env)
|
||||
SPRING_PROFILES_ACTIVE: ${DOCKER_SPRING_PROFILES_DEFAULT:-default}
|
||||
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}"
|
||||
networks:
|
||||
- meldestelle-network
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "--fail", "http://localhost:${AUTH_SERVICE_PORT:-8087}/actuator/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 60s
|
||||
restart: unless-stopped
|
||||
# auth-server:
|
||||
# build:
|
||||
# context: .
|
||||
# dockerfile: dockerfiles/infrastructure/auth-server/Dockerfile
|
||||
# args:
|
||||
# # Global build arguments (from docker/build-args/global.env)
|
||||
# GRADLE_VERSION: ${DOCKER_GRADLE_VERSION:-9.0.0}
|
||||
# JAVA_VERSION: ${DOCKER_JAVA_VERSION:-21}
|
||||
# BUILD_DATE: ${BUILD_DATE}
|
||||
# VERSION: ${DOCKER_APP_VERSION:-1.0.0}
|
||||
# # Infrastructure-specific arguments (from docker/build-args/infrastructure.env)
|
||||
# SPRING_PROFILES_ACTIVE: ${DOCKER_SPRING_PROFILES_DEFAULT:-default}
|
||||
# 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}"
|
||||
# networks:
|
||||
# - meldestelle-network
|
||||
# healthcheck:
|
||||
# test: ["CMD", "curl", "--fail", "http://localhost:${AUTH_SERVICE_PORT:-8087}/actuator/health"]
|
||||
# interval: 30s
|
||||
# timeout: 10s
|
||||
# retries: 3
|
||||
# start_period: 60s
|
||||
# restart: unless-stopped
|
||||
|
||||
# ===================================================================
|
||||
# Monitoring Server (Custom Grafana Extensions)
|
||||
# ===================================================================
|
||||
monitoring-server:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: dockerfiles/infrastructure/monitoring-server/Dockerfile
|
||||
args:
|
||||
# Global build arguments (from docker/build-args/global.env)
|
||||
GRADLE_VERSION: ${DOCKER_GRADLE_VERSION:-9.0.0}
|
||||
JAVA_VERSION: ${DOCKER_JAVA_VERSION:-21}
|
||||
BUILD_DATE: ${BUILD_DATE}
|
||||
VERSION: ${DOCKER_APP_VERSION:-1.0.0}
|
||||
# Infrastructure-specific arguments (from docker/build-args/infrastructure.env)
|
||||
SPRING_PROFILES_ACTIVE: ${DOCKER_SPRING_PROFILES_DEFAULT:-default}
|
||||
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"
|
||||
networks:
|
||||
- meldestelle-network
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "--fail", "http://localhost:8088/actuator/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 60s
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- monitoring-data:/app/data
|
||||
- ./docker/monitoring:/app/config:ro
|
||||
# monitoring-server:
|
||||
# build:
|
||||
# context: .
|
||||
# dockerfile: dockerfiles/infrastructure/monitoring-server/Dockerfile
|
||||
# args:
|
||||
# # Global build arguments (from docker/build-args/global.env)
|
||||
# GRADLE_VERSION: ${DOCKER_GRADLE_VERSION:-9.0.0}
|
||||
# JAVA_VERSION: ${DOCKER_JAVA_VERSION:-21}
|
||||
# BUILD_DATE: ${BUILD_DATE}
|
||||
# VERSION: ${DOCKER_APP_VERSION:-1.0.0}
|
||||
# # Infrastructure-specific arguments (from docker/build-args/infrastructure.env)
|
||||
# SPRING_PROFILES_ACTIVE: ${DOCKER_SPRING_PROFILES_DEFAULT:-default}
|
||||
# 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"
|
||||
# networks:
|
||||
# - meldestelle-network
|
||||
# healthcheck:
|
||||
# test: ["CMD", "curl", "--fail", "http://localhost:8088/actuator/health"]
|
||||
# interval: 30s
|
||||
# timeout: 10s
|
||||
# retries: 3
|
||||
# start_period: 60s
|
||||
# restart: unless-stopped
|
||||
# volumes:
|
||||
# - monitoring-data:/app/data
|
||||
# - ./docker/monitoring:/app/config:ro
|
||||
|
||||
# ===================================================================
|
||||
# Volumes für Client-spezifische Daten
|
||||
@@ -190,6 +190,10 @@ services:
|
||||
volumes:
|
||||
monitoring-data:
|
||||
driver: local
|
||||
desktop-app-gradle-cache:
|
||||
driver: local
|
||||
web-app-gradle-cache:
|
||||
driver: local
|
||||
|
||||
# ===================================================================
|
||||
# Networks (shared network from main compose file)
|
||||
|
||||
Reference in New Issue
Block a user