refactoring: Env-Dateien und Docker-Dateien

This commit is contained in:
2025-11-21 22:37:36 +01:00
parent b1c95c1d34
commit 2935190fcd
5 changed files with 1499 additions and 232 deletions
+4 -7
View File
@@ -21,12 +21,9 @@ POSTGRES_PORT=5432:5432
REDIS_PORT=6379:6379 REDIS_PORT=6379:6379
# --- KEYCLOAK (Identity Provider) --- # --- KEYCLOAK (Identity Provider) ---
# Admin Login für die Konsole
KC_ADMIN_USER=kc-admin KC_ADMIN_USER=kc-admin
KC_ADMIN_PASSWORD=kc-password KC_ADMIN_PASSWORD=kc-password
# Hostname (Wichtig für Redirects)
KC_HOSTNAME=localhost KC_HOSTNAME=localhost
# Port Mapping
KC_PORT=8180:8080 KC_PORT=8180:8080
# --- PGADMIN (DB GUI) --- # --- PGADMIN (DB GUI) ---
@@ -46,10 +43,10 @@ GF_PORT=3000:3000
CONSUL_PORT=8500:8500 CONSUL_PORT=8500:8500
# --- API GATEWAY --- # --- API GATEWAY ---
# Der Port, der nach außen für Clients (Web App) offen ist GATEWAY_PORT=8081:8081
GATEWAY_PORT=8081 GATEWAY_DEBUG_PORT=5005:5005
# Debug Port für IntelliJ (Remote JVM Debug) GATEWAY_SERVER_PORT=8081
GATEWAY_DEBUG_PORT=5005
# --- MICROSERVICES --- # --- MICROSERVICES ---
PING_SERVICE_PORT=8082:8082 PING_SERVICE_PORT=8082:8082
PING_DEBUG_PORT=5006:5006
+11 -3
View File
@@ -168,13 +168,14 @@ services:
GRADLE_VERSION: 9.1.0 GRADLE_VERSION: 9.1.0
JAVA_VERSION: 21 JAVA_VERSION: 21
VERSION: 1.0.0 VERSION: 1.0.0
BUILD_DATE: "2025-11-20" BUILD_DATE: "2025-11-21"
container_name: ${COMPOSE_PROJECT_NAME}-gateway container_name: ${COMPOSE_PROJECT_NAME}-gateway
restart: no restart: no
ports: ports:
- "${GATEWAY_PORT}" - "${GATEWAY_PORT}"
- "${GATEWAY_DEBUG_PORT}" # Für Remote Debugging - "${GATEWAY_DEBUG_PORT}" # Für Remote Debugging
environment: environment:
SERVER_PORT: ${GATEWAY_SERVER_PORT}
SPRING_PROFILES_ACTIVE: docker SPRING_PROFILES_ACTIVE: docker
DEBUG: "true" DEBUG: "true"
# --- VERBINDUNGEN --- # --- VERBINDUNGEN ---
@@ -213,12 +214,12 @@ services:
GRADLE_VERSION: 9.1.0 GRADLE_VERSION: 9.1.0
JAVA_VERSION: 21 JAVA_VERSION: 21
VERSION: 1.0.0 VERSION: 1.0.0
BUILD_DATE: "2025-11-20" BUILD_DATE: "2025-11-21"
container_name: ${COMPOSE_PROJECT_NAME}-ping-service container_name: ${COMPOSE_PROJECT_NAME}-ping-service
restart: no # "${RESTART_POLICY:-unless-stopped}" restart: no # "${RESTART_POLICY:-unless-stopped}"
ports: ports:
- "${PING_SERVICE_PORT}" - "${PING_SERVICE_PORT}"
- "5006:5005" # Debug Port - "${PING_DEBUG_PORT}"
environment: environment:
SPRING_PROFILES_ACTIVE: docker SPRING_PROFILES_ACTIVE: docker
DEBUG: "true" DEBUG: "true"
@@ -241,6 +242,13 @@ services:
# Wir nutzen den Service-Namen, genau wie bei Postgres # Wir nutzen den Service-Namen, genau wie bei Postgres
SPRING_DATA_REDIS_HOST: ${COMPOSE_PROJECT_NAME}-redis SPRING_DATA_REDIS_HOST: ${COMPOSE_PROJECT_NAME}-redis
SPRING_DATA_REDIS_PORT: 6379 SPRING_DATA_REDIS_PORT: 6379
depends_on:
consul:
condition: service_healthy
postgres:
condition: service_healthy
keycloak:
condition: service_healthy
networks: networks:
- meldestelle-network - meldestelle-network
+1
View File
@@ -18,6 +18,7 @@ kotlinx-coroutines = "1.10.2"
# --- Spring Ecosystem --- # --- Spring Ecosystem ---
springBoot = "3.5.6" springBoot = "3.5.6"
springCloud = "2025.0.0" springCloud = "2025.0.0"
springCloudGateway = "4.3.0"
springDependencyManagement = "1.1.7" springDependencyManagement = "1.1.7"
springdoc = "2.8.13" springdoc = "2.8.13"
@@ -1,6 +1,6 @@
# Port, auf dem das Gateway läuft # Port, auf dem das Gateway läuft
server: server:
port: ${GATEWAY_PORT:8081} port: ${SERVER_PORT:8081}
# Optimierte Netty-Konfiguration für reaktive Anwendungen # Optimierte Netty-Konfiguration für reaktive Anwendungen
netty: netty:
connection-timeout: 5s connection-timeout: 5s
@@ -74,91 +74,24 @@ spring:
value: no-cache, no-store, must-revalidate value: no-cache, no-store, must-revalidate
routes: routes:
# ============================================================== # ==============================================================
# --- Gateway-Info-Route (optional) --- # --- Gateway-Info-Route (optional) ---
# ============================================================== # ==============================================================
- id: gateway-info-route - id: gateway-info-route
uri: http://localhost:${server.port} uri: http://localhost:${server.port}
predicates: predicates:
- Path=/
- Method=GET - Method=GET
filters: filters:
- SetStatus=200 - name: setStatus
- SetResponseHeader=Content-Type,application/json args:
status: 200
- name: setResponseHeader
args:
Content-Type: application/json
# ============================================================== # ==============================================================
# --- Members-Service-Integration (optional) --- # --- Ping-Service-Integration (optional) ---
# ============================================================== # ==============================================================
# - id: members-service-route
# uri: lb://members-service
# predicates:
# - Path=/api/members/**
# filters:
# - StripPrefix=1
# - name: CircuitBreaker
# args:
# name: membersCircuitBreaker
# fallbackUri: forward:/fallback/members
# ==============================================================
# --- Horses-Service-Integration (optional) ---
# ==============================================================
# - id: horses-service-route
# uri: lb://horses-service
# predicates:
# - Path=/api/horses/**
# filters:
# - StripPrefix=1
# - name: CircuitBreaker
# args:
# name: horsesCircuitBreaker
# fallbackUri: forward:/fallback/horses
# ==============================================================
# --- Events-Service-Integration (optional) ---
# ==============================================================
# - id: events-service-route
# uri: lb://events-service
# predicates:
# - Path=/api/events/**
# filters:
# - StripPrefix=1
# - name: CircuitBreaker
# args:
# name: eventsCircuitBreaker
# fallbackUri: forward:/fallback/events
# ==============================================================
# --- Masterdata-Service-Integration (optional) ---
# ==============================================================
# - id: masterdata-service-route
# uri: lb://masterdata-service
# predicates:
# - Path=/api/masterdata/**
# filters:
# - StripPrefix=1
# - name: CircuitBreaker
# args:
# name: masterdataCircuitBreaker
# fallbackUri: forward:/fallback/masterdata
# ==============================================================
# --- Auth-Service-Integration (optional) ---
# ==============================================================
# - id: auth-service-route
# uri: lb://auth-service
# predicates:
# - Path=/api/auth/**
# filters:
# - StripPrefix=1
# - name: CircuitBreaker
# args:
# name: authCircuitBreaker
# fallbackUri: forward:/fallback/auth
# ==============================================================
# --- Ping-Service-Integration (optional) ---
# ==============================================================
- id: ping-service-route - id: ping-service-route
uri: lb://ping-service uri: lb://ping-service
predicates: predicates:
@@ -166,6 +99,75 @@ spring:
filters: filters:
- StripPrefix=1 - StripPrefix=1
# ==============================================================
# --- Members-Service-Integration (optional) ---
# ==============================================================
# - id: members-service-route
# uri: lb://members-service
# predicates:
# - Path=/api/members/**
# filters:
# - StripPrefix=1
# - name: CircuitBreaker
# args:
# name: membersCircuitBreaker
# fallbackUri: forward:/fallback/members
# ==============================================================
# --- Horses-Service-Integration (optional) ---
# ==============================================================
# - id: horses-service-route
# uri: lb://horses-service
# predicates:
# - Path=/api/horses/**
# filters:
# - StripPrefix=1
# - name: CircuitBreaker
# args:
# name: horsesCircuitBreaker
# fallbackUri: forward:/fallback/horses
# ==============================================================
# --- Events-Service-Integration (optional) ---
# ==============================================================
# - id: events-service-route
# uri: lb://events-service
# predicates:
# - Path=/api/events/**
# filters:
# - StripPrefix=1
# - name: CircuitBreaker
# args:
# name: eventsCircuitBreaker
# fallbackUri: forward:/fallback/events
# ==============================================================
# --- Masterdata-Service-Integration (optional) ---
# ==============================================================
# - id: masterdata-service-route
# uri: lb://masterdata-service
# predicates:
# - Path=/api/masterdata/**
# filters:
# - StripPrefix=1
# - name: CircuitBreaker
# args:
# name: masterdataCircuitBreaker
# fallbackUri: forward:/fallback/masterdata
# ==============================================================
# --- Auth-Service-Integration (optional) ---
# ==============================================================
# - id: auth-service-route
# uri: lb://auth-service
# predicates:
# - Path=/api/auth/**
# filters:
# - StripPrefix=1
# - name: CircuitBreaker
# args:
# name: authCircuitBreaker
# fallbackUri: forward:/fallback/auth
# Circuit Breaker Konfiguration # Circuit Breaker Konfiguration
resilience4j: resilience4j:
circuitbreaker: circuitbreaker:
+1401 -142
View File
File diff suppressed because it is too large Load Diff