refactor(infra): Restrukturierung Config-Ordner & Einführung von Docker-Profilen

Umfangreiches Refactoring der Projektkonfiguration zur klaren Trennung von Build-, Runtime- und Applikations-Logik.

Änderungen im Detail:
- Struktur: Neuorganisation des `config/` Verzeichnisses in logische Bereiche:
  - `config/docker`: Reine Infrastruktur-Configs (Postgres, Redis, Nginx, Monitoring).
  - `config/quality`: Statische Code-Analyse (Detekt, Lint).
  - `config/app`: Gemeinsame Spring-Boot-Konfigurationen.
- Docker Compose:
  - Einführung von Profilen (`infra`, `backend`, `ops`, `gui`, `tools`) für gezieltes Starten von Teilbereichen.
  - Anpassung aller Volume-Pfade auf die neue Struktur.
- Spring Boot Config:
  - Zentralisierung gemeinsamer Einstellungen (Datasource, Redis, JPA) in `config/app/base-application.yml`.
  - Parametrisierung der Hosts für nahtlosen Wechsel zwischen Docker und Localhost.
  - Bereinigung der service-spezifischen `application.yaml` Dateien (z.B. Ping-Service).
- Cleanup: Entfernen redundanter "Ghost-Files" (`versions.toml`, `central.toml`, `config/.env`), um eine echte Single Source of Truth (SSoT) zu gewährleisten.
This commit is contained in:
2025-12-10 15:25:10 +01:00
parent 8221a7b915
commit f402fbaf19
45 changed files with 171 additions and 729 deletions
+9 -6
View File
@@ -14,18 +14,21 @@ ARG JAVA_VERSION
ARG BUILD_DATE
ARG VERSION
# Service-specific arguments (docker/build-args/services.env)
# Note: No runtime profiles as build ARGs
# Build stage: compile the ping-service JAR inside Docker
FROM gradle:${GRADLE_VERSION}-jdk${JAVA_VERSION}-alpine AS builder
# Re-declare build arguments for this stage
ARG VERSION
ARG BUILD_DATE
# Add metadata labels
LABEL stage=builder \
service=ping-service \
maintainer="Meldestelle Development Team" \
version="${VERSION}" \
build.date="${BUILD_DATE}"
LABEL stage=builder
LABEL service=ping-service
LABEL maintainer="Meldestelle Development Team"
LABEL version="${VERSION}"
LABEL build.date="${BUILD_DATE}"
WORKDIR /workspace
@@ -1,18 +1,46 @@
# Port, auf dem das Ping-Service läuft
server:
port: ${PING_SERVICE_PORT:8082}
spring:
application:
name: ping-service
profiles:
active: ${SPRING_PROFILES_ACTIVE:dev}
# datasource:
# url: ${SPRING_DATASOURCE_URL:jdbc:postgresql://localhost:5432/pg-meldestelle-db}
# username: ${SPRING_DATASOURCE_USERNAME:pg-user}
# password: ${SPRING_DATASOURCE_PASSWORD:pg-password}
# driver-class-name: org.postgresql.Driver
# # --- REDIS KONFIGURATION (NEU) ---
# data:
# redis:
# host: ${SPRING_DATA_REDIS_HOST:localhost}
# port: ${SPRING_DATA_REDIS_PORT:6379}
# password: ${SPRING_DATA_REDIS_PASSWORD:redis-password} # Leer lassen als Default
# # Optional: Timeouts für Stabilität
# connect-timeout: 5s
# timeout: 2s
# jpa:
# database-platform: org.hibernate.dialect.PostgreSQLDialect
# hibernate:
# ddl-auto: update
# open-in-view: false
cloud:
consul:
host: ${CONSUL_HOST:localhost}
port: ${CONSUL_PORT:8500}
enabled: ${CONSUL_ENABLED:true}
discovery:
enabled: true
register: true
enabled: ${CONSUL_ENABLED:true}
register: ${CONSUL_ENABLED:true}
health-check-path: /actuator/health
health-check-interval: 10s
server:
port: ${SERVER_PORT:${PING_SERVICE_PORT:8082}}
instance-id: ${spring.application.name}-${server.port}-${random.uuid}
management:
endpoints:
@@ -22,6 +50,7 @@ management:
endpoint:
health:
show-details: always
show-components: always
probes:
enabled: true
tracing: