feat: refactor Health-Check-Probes und Connectivity-Logik, stabilisiere Docker-Services

Signed-off-by: StefanMoCoAt <stefan.mo.co@gmail.com>
This commit is contained in:
Stefan Mogeritsch 2026-04-16 18:47:13 +02:00
parent edd33c34dc
commit 8f45544fe1
5 changed files with 44 additions and 5 deletions

View File

@ -35,6 +35,8 @@ management:
endpoint:
health:
show-details: always
probes:
enabled: true
prometheus:
metrics:
export:

View File

@ -44,6 +44,8 @@ management:
endpoint:
health:
show-details: always
probes:
enabled: true
prometheus:
metrics:
export:

View File

@ -81,7 +81,7 @@ services:
# condition: "service_healthy"
healthcheck:
test: [ "CMD", "wget", "--spider", "-q", "http://localhost:8081/actuator/health/readiness" ]
test: [ "CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8081/actuator/health/readiness" ]
interval: 15s
timeout: 5s
retries: 5
@ -156,7 +156,7 @@ services:
condition: "service_healthy"
healthcheck:
test: [ "CMD", "wget", "--spider", "-q", "http://localhost:8082/actuator/health/readiness" ]
test: [ "CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8082/actuator/health/readiness" ]
interval: 15s
timeout: 5s
retries: 5
@ -231,7 +231,7 @@ services:
condition: "service_healthy"
healthcheck:
test: [ "CMD", "wget", "--spider", "-q", "http://localhost:8086/actuator/health/readiness" ]
test: [ "CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8086/actuator/health/readiness" ]
interval: 15s
timeout: 5s
retries: 5
@ -306,7 +306,7 @@ services:
condition: "service_healthy"
healthcheck:
test: [ "CMD", "wget", "--spider", "-q", "http://localhost:8085/actuator/health/readiness" ]
test: [ "CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8085/actuator/health/readiness" ]
interval: 15s
timeout: 5s
retries: 5

View File

@ -0,0 +1,35 @@
# 📓 Journal-Eintrag: 2026-04-16 - Health-Fixes & Connectivity Refactoring
## 🏗️ Status Quo
Nach der Integration des ZNS-First Wizards gab es Stabilitätsprobleme in der Docker-Umgebung (Unhealthy Services) und
eine fachliche Fehlinterpretation des `ping-service`.
## 🚀 Wichtigste Korrekturen
### 1. Actuator & Docker Stability
- **Problem**: `masterdata-service` und `events-service` meldeten unter Docker 404 auf den Readiness-Probes.
- **Lösung**: Explizite Aktivierung der Spring Boot Probes (`management.endpoint.health.probes.enabled: true`) in den
jeweiligen `application.yml` Dateien.
- **Docker-Compose**: Vereinheitlichung der Healthchecks in `dc-backend.yaml` auf den `/actuator/health/readiness`
Endpoint mit detaillierterer Diagnose (`--no-verbose`).
### 2. Connectivity Refactoring (The Ping "Un-Abuse")
- **Problem**: Der `ConnectivityTracker` im Frontend nutzte den `ping-service`, um den generellen Online-Status ("Cloud
synchronisiert") anzuzeigen. Der `ping-service` soll jedoch nur ein technischer Durchstich sein.
- **Lösung**: Umstellung des `ConnectivityTracker` auf den neutralen `/actuator/health/readiness` Endpoint des
API-Gateways.
- **Resultat**: Der `ping-service` ist wieder frei für seine ursprüngliche Bestimmung als technisches Validierungs-Tool.
Der Footer-Status repräsentiert nun korrekt die Erreichbarkeit der Cloud-Infrastruktur über das Gateway.
## 🛠️ Technische Details
- **Services**: `api-gateway`, `masterdata-service`, `events-service`, `ping-service`.
- **Frontend**: `frontend:core:network` (`ConnectivityTracker.kt`).
---
**🧹 [Curator]**: Health-Checks und Connectivity-Logik bereinigt. Dokumentation aktualisiert.
**👷 [Backend Developer]**: Alle Services sind nun auch unter Docker stabil `healthy`.
**🏗️ [Lead Architect]**: Fachliche Trennung von System-Health und technischem Durchstich (Ping) wiederhergestellt.

View File

@ -36,7 +36,7 @@ class ConnectivityTracker : KoinComponent {
private suspend fun checkConnection(): Boolean {
return try {
val response = client.get(NetworkConfig.baseUrl.trimEnd('/') + "/api/ping/health")
val response = client.get(NetworkConfig.baseUrl.trimEnd('/') + "/actuator/health/readiness")
response.status.value in 200..299
} catch (_: Exception) {
false