refactoring Single Source of Truth
This commit is contained in:
+22
-1
@@ -161,7 +161,28 @@ RATELIMIT_GLOBAL_PERIOD_MINUTES=1
|
||||
RATELIMIT_INCLUDE_HEADERS=true
|
||||
|
||||
# =============================================================================
|
||||
# 12. SPRING PROFILES AND GATEWAY
|
||||
# 12. DOCKER BUILD ARGUMENTS
|
||||
# =============================================================================
|
||||
# Centralized Docker build arguments for compose files
|
||||
# These mirror the values from docker/build-args/ for standalone compose usage
|
||||
DOCKER_GRADLE_VERSION=9.0.0
|
||||
DOCKER_JAVA_VERSION=21
|
||||
DOCKER_NODE_VERSION=20.11.0
|
||||
DOCKER_NGINX_VERSION=1.25-alpine
|
||||
DOCKER_APP_VERSION=1.0.0
|
||||
BUILD_DATE=2025-09-13T23:32:00Z
|
||||
|
||||
# Monitoring & Infrastructure versions
|
||||
DOCKER_PROMETHEUS_VERSION=v2.54.1
|
||||
DOCKER_GRAFANA_VERSION=11.3.0
|
||||
DOCKER_KEYCLOAK_VERSION=26.0.7
|
||||
|
||||
# Spring profiles for Docker builds
|
||||
DOCKER_SPRING_PROFILES_DEFAULT=default
|
||||
DOCKER_SPRING_PROFILES_DOCKER=docker
|
||||
|
||||
# =============================================================================
|
||||
# 13. SPRING PROFILES AND GATEWAY
|
||||
# =============================================================================
|
||||
SPRING_PROFILES_ACTIVE=dev
|
||||
GATEWAY_ADMIN_USER=admin
|
||||
|
||||
+75
-59
@@ -104,69 +104,85 @@ services:
|
||||
# ===================================================================
|
||||
# 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}"
|
||||
# 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
|
||||
# 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
|
||||
|
||||
@@ -29,7 +29,7 @@ DESKTOP_APP_BUILD_TARGET=composeDesktop
|
||||
NODE_ENV=production
|
||||
APP_TITLE=Meldestelle
|
||||
APP_VERSION=1.0.0
|
||||
DOCKER_APP_VERSION
|
||||
DOCKER_APP_VERSION=1.0.0
|
||||
|
||||
# --- Development Configuration ---
|
||||
WEBPACK_DEV_SERVER_HOST=0.0.0.0
|
||||
|
||||
@@ -11,7 +11,7 @@ JAVA_VERSION=21
|
||||
# --- Build Metadata ---
|
||||
BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
|
||||
VERSION=1.0.0
|
||||
DOCKER_APP_VERSION
|
||||
DOCKER_APP_VERSION=1.0.0
|
||||
|
||||
# --- Common Base Images ---
|
||||
ALPINE_VERSION=3.19
|
||||
|
||||
@@ -57,6 +57,7 @@ COPY build.gradle.kts ./
|
||||
|
||||
# Copy infrastructure dependencies
|
||||
COPY infrastructure/auth/auth-client/ infrastructure/auth/auth-client/
|
||||
COPY infrastructure/cache/ infrastructure/cache/
|
||||
|
||||
# Copy auth-server specific files
|
||||
COPY infrastructure/auth/auth-server/build.gradle.kts infrastructure/auth/auth-server/
|
||||
|
||||
@@ -43,6 +43,7 @@ COPY build.gradle.kts ./
|
||||
|
||||
# Copy monitoring dependencies
|
||||
COPY infrastructure/monitoring/monitoring-client/ infrastructure/monitoring/monitoring-client/
|
||||
COPY infrastructure/cache/ infrastructure/cache/
|
||||
|
||||
# Copy monitoring-server specific files
|
||||
COPY infrastructure/monitoring/monitoring-server/build.gradle.kts infrastructure/monitoring/monitoring-server/
|
||||
|
||||
Reference in New Issue
Block a user