refactoring
This commit is contained in:
@@ -13,16 +13,9 @@
|
||||
|
||||
.ONESHELL:
|
||||
|
||||
# Choose docker compose CLI (prefers new plugin)
|
||||
DOCKER_COMPOSE_PLUGIN := $(shell docker compose version >/dev/null 2>&1 && echo 1 || echo 0)
|
||||
DOCKER_COMPOSE_LEGACY := $(shell command -v docker-compose >/dev/null 2>&1 && echo 1 || echo 0)
|
||||
ifeq ($(DOCKER_COMPOSE_PLUGIN),1)
|
||||
# Modern Docker Compose CLI (plugin-based)
|
||||
# Defaults to 'docker compose' as the legacy standalone tool is deprecated
|
||||
COMPOSE = docker compose
|
||||
else ifeq ($(DOCKER_COMPOSE_LEGACY),1)
|
||||
COMPOSE = docker-compose
|
||||
else
|
||||
COMPOSE = docker compose
|
||||
endif
|
||||
|
||||
# Default target
|
||||
.DEFAULT_GOAL := help
|
||||
@@ -190,6 +183,13 @@ env-test: ## Switch to test environment
|
||||
@echo "✅ Test environment activated (.env -> config/.env.test)"
|
||||
@echo "Optimized for automated testing with alternative ports"
|
||||
|
||||
validate: ## Validate Docker Compose configuration and environment
|
||||
@echo "🔍 Validating configuration..."
|
||||
@if [ ! -f .env ]; then echo "❌ No .env file found! Run 'make env-dev' first."; exit 1; fi
|
||||
@echo "✅ Environment file exists"
|
||||
@$(COMPOSE) config --quiet && echo "✅ Docker Compose configuration is valid" || echo "❌ Docker Compose configuration has errors"
|
||||
@echo "✅ Validation completed"
|
||||
|
||||
# ===================================================================
|
||||
# Production Commands
|
||||
# ===================================================================
|
||||
|
||||
+4
-4
@@ -61,12 +61,12 @@ Die folgenden Services sind vollständig konfiguriert:
|
||||
|
||||
2. **Services starten:**
|
||||
```bash
|
||||
docker-compose up -d
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
3. **Services überprüfen:**
|
||||
```bash
|
||||
docker-compose ps
|
||||
docker compose ps
|
||||
```
|
||||
|
||||
### Anpassungen
|
||||
@@ -92,8 +92,8 @@ Vollständige Dokumentation finden Sie in:
|
||||
|
||||
Bei Problemen:
|
||||
1. Überprüfen Sie die aktive Umgebungskonfiguration: `ls -la .env`
|
||||
2. Validieren Sie die Docker-Compose-Konfiguration: `docker-compose config`
|
||||
3. Überprüfen Sie die Service-Logs: `docker-compose logs -f`
|
||||
2. Validieren Sie die Docker-Compose-Konfiguration: `docker compose config`
|
||||
3. Überprüfen Sie die Service-Logs: `docker compose logs -f`
|
||||
4. Konsultieren Sie `config/README.md` für detaillierte Konfigurationsrichtlinien
|
||||
|
||||
## Nächste Schritte
|
||||
|
||||
+18
-18
@@ -134,13 +134,13 @@ PROMETHEUS_HOSTNAME=metrics.ihredomain.com
|
||||
|
||||
```bash
|
||||
# Produktionsumgebung starten
|
||||
docker-compose -f docker-compose.prod.yml --env-file .env.prod up -d
|
||||
docker compose -f docker-compose.prod.yml --env-file .env.prod up -d
|
||||
|
||||
# Status überprüfen
|
||||
docker-compose -f docker-compose.prod.yml ps
|
||||
docker compose -f docker-compose.prod.yml ps
|
||||
|
||||
# Logs überwachen
|
||||
docker-compose -f docker-compose.prod.yml logs -f
|
||||
docker compose -f docker-compose.prod.yml logs -f
|
||||
```
|
||||
|
||||
## 🔧 Konfiguration
|
||||
@@ -230,10 +230,10 @@ Standard-Dashboards für:
|
||||
|
||||
```bash
|
||||
# Service-Logs anzeigen
|
||||
docker-compose -f docker-compose.prod.yml logs [service-name]
|
||||
docker compose -f docker-compose.prod.yml logs [service-name]
|
||||
|
||||
# Logs in Echtzeit verfolgen
|
||||
docker-compose -f docker-compose.prod.yml logs -f [service-name]
|
||||
docker compose -f docker-compose.prod.yml logs -f [service-name]
|
||||
|
||||
# Log-Rotation konfigurieren
|
||||
# Fügen Sie zu /etc/docker/daemon.json hinzu:
|
||||
@@ -277,7 +277,7 @@ docker-compose -f docker-compose.prod.yml logs -f [service-name]
|
||||
cat > backup-db.sh << 'EOF'
|
||||
#!/bin/bash
|
||||
DATE=$(date +%Y%m%d_%H%M%S)
|
||||
docker-compose -f docker-compose.prod.yml exec -T postgres \
|
||||
docker compose -f docker-compose.prod.yml exec -T postgres \
|
||||
pg_dump -U meldestelle_prod meldestelle_prod | \
|
||||
gzip > backups/db_backup_$DATE.sql.gz
|
||||
find backups/ -name "db_backup_*.sql.gz" -mtime +30 -delete
|
||||
@@ -293,11 +293,11 @@ echo "0 2 * * * /path/to/backup-db.sh" | crontab -
|
||||
|
||||
```bash
|
||||
# Redis-Daten sichern
|
||||
docker-compose -f docker-compose.prod.yml exec redis \
|
||||
docker compose -f docker-compose.prod.yml exec redis \
|
||||
redis-cli --rdb /data/backup.rdb
|
||||
|
||||
# Backup kopieren
|
||||
docker cp $(docker-compose -f docker-compose.prod.yml ps -q redis):/data/backup.rdb \
|
||||
docker cp $(docker compose -f docker-compose.prod.yml ps -q redis):/data/backup.rdb \
|
||||
backups/redis_backup_$(date +%Y%m%d_%H%M%S).rdb
|
||||
```
|
||||
|
||||
@@ -306,14 +306,14 @@ docker cp $(docker-compose -f docker-compose.prod.yml ps -q redis):/data/backup.
|
||||
```bash
|
||||
# Datenbank wiederherstellen
|
||||
gunzip -c backups/db_backup_YYYYMMDD_HHMMSS.sql.gz | \
|
||||
docker-compose -f docker-compose.prod.yml exec -T postgres \
|
||||
docker compose -f docker-compose.prod.yml exec -T postgres \
|
||||
psql -U meldestelle_prod -d meldestelle_prod
|
||||
|
||||
# Redis wiederherstellen
|
||||
docker-compose -f docker-compose.prod.yml stop redis
|
||||
docker compose -f docker-compose.prod.yml stop redis
|
||||
docker cp backups/redis_backup_YYYYMMDD_HHMMSS.rdb \
|
||||
$(docker-compose -f docker-compose.prod.yml ps -q redis):/data/dump.rdb
|
||||
docker-compose -f docker-compose.prod.yml start redis
|
||||
$(docker compose -f docker-compose.prod.yml ps -q redis):/data/dump.rdb
|
||||
docker compose -f docker-compose.prod.yml start redis
|
||||
```
|
||||
|
||||
## 🔄 Updates und Wartung
|
||||
@@ -322,23 +322,23 @@ docker-compose -f docker-compose.prod.yml start redis
|
||||
|
||||
```bash
|
||||
# Service einzeln aktualisieren
|
||||
docker-compose -f docker-compose.prod.yml pull [service-name]
|
||||
docker-compose -f docker-compose.prod.yml up -d --no-deps [service-name]
|
||||
docker compose -f docker-compose.prod.yml pull [service-name]
|
||||
docker compose -f docker-compose.prod.yml up -d --no-deps [service-name]
|
||||
|
||||
# Alle Services aktualisieren
|
||||
docker-compose -f docker-compose.prod.yml pull
|
||||
docker-compose -f docker-compose.prod.yml up -d
|
||||
docker compose -f docker-compose.prod.yml pull
|
||||
docker compose -f docker-compose.prod.yml up -d
|
||||
```
|
||||
|
||||
### Wartungsmodus
|
||||
|
||||
```bash
|
||||
# Wartungsseite aktivieren
|
||||
docker-compose -f docker-compose.prod.yml stop nginx
|
||||
docker compose -f docker-compose.prod.yml stop nginx
|
||||
# Wartungs-Nginx Container starten (mit Wartungsseite)
|
||||
|
||||
# Nach Wartung: Normalen Betrieb wiederherstellen
|
||||
docker-compose -f docker-compose.prod.yml start nginx
|
||||
docker compose -f docker-compose.prod.yml start nginx
|
||||
```
|
||||
|
||||
## 🚨 Troubleshooting
|
||||
|
||||
@@ -9,9 +9,9 @@ Das Projekt wurde kürzlich auf eine modulare Architektur migriert, um die Wartb
|
||||
## Systemanforderungen
|
||||
|
||||
- Java 21
|
||||
- Kotlin 2.1.21
|
||||
- Gradle 8.14
|
||||
- Docker und Docker Compose
|
||||
- Kotlin 2.2.10
|
||||
- Gradle 8.11+ (automatischer Download über Gradle Wrapper)
|
||||
- Docker und Docker Compose (v2.0+)
|
||||
|
||||
## Infrastruktur
|
||||
|
||||
@@ -90,13 +90,13 @@ Das System bietet verschiedene Docker-Konfigurationen für unterschiedliche Umge
|
||||
|
||||
```bash
|
||||
# Infrastruktur starten
|
||||
docker-compose up -d
|
||||
docker compose up -d
|
||||
|
||||
# Status überprüfen
|
||||
docker-compose ps
|
||||
docker compose ps
|
||||
|
||||
# Logs anzeigen
|
||||
docker-compose logs -f
|
||||
docker compose logs -f
|
||||
```
|
||||
|
||||
Dies startet alle erforderlichen Dienste wie PostgreSQL, Redis, Keycloak, Kafka, Zipkin und optional Prometheus und Grafana.
|
||||
@@ -203,14 +203,14 @@ Es gibt noch einige offene Probleme, insbesondere bei den Client-Modulen, die Ko
|
||||
#### 1. Services starten nicht
|
||||
```bash
|
||||
# Alle Services stoppen und neu starten
|
||||
docker-compose down
|
||||
docker-compose up -d
|
||||
docker compose down
|
||||
docker compose up -d
|
||||
|
||||
# Einzelnen Service neu starten
|
||||
docker-compose restart [service-name]
|
||||
docker compose restart [service-name]
|
||||
|
||||
# Service-Logs überprüfen
|
||||
docker-compose logs [service-name]
|
||||
docker compose logs [service-name]
|
||||
```
|
||||
|
||||
#### 2. Port bereits belegt
|
||||
@@ -228,39 +228,39 @@ nano .env
|
||||
#### 3. Datenbank-Verbindungsfehler
|
||||
```bash
|
||||
# PostgreSQL-Status prüfen
|
||||
docker-compose exec postgres pg_isready -U meldestelle
|
||||
docker compose exec postgres pg_isready -U meldestelle
|
||||
|
||||
# Datenbank-Logs anzeigen
|
||||
docker-compose logs postgres
|
||||
docker compose logs postgres
|
||||
|
||||
# Verbindung manuell testen
|
||||
docker-compose exec postgres psql -U meldestelle -d meldestelle
|
||||
docker compose exec postgres psql -U meldestelle -d meldestelle
|
||||
```
|
||||
|
||||
#### 4. Keycloak-Authentifizierung fehlgeschlagen
|
||||
```bash
|
||||
# Keycloak-Status prüfen
|
||||
docker-compose logs keycloak
|
||||
docker compose logs keycloak
|
||||
|
||||
# Keycloak Admin-Console öffnen
|
||||
# http://localhost:8180/admin (admin/admin)
|
||||
|
||||
# Keycloak-Datenbank zurücksetzen
|
||||
docker-compose down
|
||||
docker compose down
|
||||
docker volume rm meldestelle_postgres-data
|
||||
docker-compose up -d
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
#### 5. Kafka-Verbindungsprobleme
|
||||
```bash
|
||||
# Kafka-Status prüfen
|
||||
docker-compose exec kafka kafka-topics --bootstrap-server localhost:9092 --list
|
||||
docker compose exec kafka kafka-topics --bootstrap-server localhost:9092 --list
|
||||
|
||||
# Zookeeper-Status prüfen
|
||||
docker-compose exec zookeeper nc -z localhost 2181
|
||||
docker compose exec zookeeper nc -z localhost 2181
|
||||
|
||||
# Kafka-Logs anzeigen
|
||||
docker-compose logs kafka zookeeper
|
||||
docker compose logs kafka zookeeper
|
||||
```
|
||||
|
||||
#### 6. Speicherplatz-Probleme
|
||||
@@ -292,39 +292,39 @@ docker stats
|
||||
|
||||
```bash
|
||||
# Alle Services mit Logs starten
|
||||
docker-compose up
|
||||
docker compose up
|
||||
|
||||
# Services im Hintergrund starten
|
||||
docker-compose up -d
|
||||
docker compose up -d
|
||||
|
||||
# Bestimmte Services starten
|
||||
docker-compose up postgres redis
|
||||
docker compose up postgres redis
|
||||
|
||||
# Services stoppen
|
||||
docker-compose stop
|
||||
docker compose stop
|
||||
|
||||
# Services stoppen und Container entfernen
|
||||
docker-compose down
|
||||
docker compose down
|
||||
|
||||
# Services mit Volume-Bereinigung stoppen
|
||||
docker-compose down -v
|
||||
docker compose down -v
|
||||
|
||||
# Container-Shell öffnen
|
||||
docker-compose exec [service-name] /bin/bash
|
||||
docker compose exec [service-name] /bin/bash
|
||||
# oder für Alpine-basierte Images:
|
||||
docker-compose exec [service-name] /bin/sh
|
||||
docker compose exec [service-name] /bin/sh
|
||||
|
||||
# Konfiguration validieren
|
||||
docker-compose config
|
||||
docker compose config
|
||||
|
||||
# Service-Status anzeigen
|
||||
docker-compose ps
|
||||
docker compose ps
|
||||
|
||||
# Logs aller Services anzeigen
|
||||
docker-compose logs
|
||||
docker compose logs
|
||||
|
||||
# Logs eines bestimmten Services verfolgen
|
||||
docker-compose logs -f [service-name]
|
||||
docker compose logs -f [service-name]
|
||||
```
|
||||
|
||||
## Dokumentation
|
||||
@@ -344,4 +344,4 @@ Siehe [LICENSE](LICENSE) Datei.
|
||||
|
||||
## Stand
|
||||
|
||||
Letzte Aktualisierung: 22. Juli 2025
|
||||
Letzte Aktualisierung: 14. September 2025
|
||||
|
||||
@@ -60,6 +60,10 @@ subprojects {
|
||||
environment("NODE_OPTIONS", merged)
|
||||
// Also set the legacy switch to silence warnings entirely
|
||||
environment("NODE_NO_WARNINGS", "1")
|
||||
// Set Chrome binary path to avoid snap permission issues
|
||||
environment("CHROME_BIN", "/usr/bin/google-chrome")
|
||||
environment("CHROMIUM_BIN", "/usr/bin/google-chrome")
|
||||
environment("PUPPETEER_EXECUTABLE_PATH", "/usr/bin/google-chrome")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,6 +86,10 @@ tasks.withType<Exec>().configureEach {
|
||||
val merged = if (current.isNullOrBlank()) "--no-deprecation" else "$current --no-deprecation"
|
||||
environment("NODE_OPTIONS", merged)
|
||||
environment("NODE_NO_WARNINGS", "1")
|
||||
// Set Chrome binary path to avoid snap permission issues
|
||||
environment("CHROME_BIN", "/usr/bin/google-chrome")
|
||||
environment("CHROMIUM_BIN", "/usr/bin/google-chrome")
|
||||
environment("PUPPETEER_EXECUTABLE_PATH", "/usr/bin/google-chrome")
|
||||
}
|
||||
|
||||
tasks.wrapper {
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
|
||||
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
|
||||
import org.gradle.api.tasks.Copy
|
||||
import org.gradle.api.tasks.Sync
|
||||
import org.gradle.api.file.DuplicatesStrategy
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
@@ -11,12 +14,33 @@ plugins {
|
||||
kotlin {
|
||||
jvm()
|
||||
|
||||
js(IR) {
|
||||
// Disable browser-based tests (Karma/Chrome) to avoid ChromeHeadless issues
|
||||
browser {
|
||||
testTask {
|
||||
// Prevent launching ChromeHeadless (snap permission issues on some systems)
|
||||
enabled = false
|
||||
}
|
||||
}
|
||||
// Run JS tests in Node.js instead (no browser needed)
|
||||
nodejs {
|
||||
testTask {
|
||||
useMocha()
|
||||
}
|
||||
}
|
||||
binaries.executable()
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalWasmDsl::class)
|
||||
wasmJs {
|
||||
// Disable browser-based tests for WASM as well to avoid Karma/Chrome
|
||||
browser {
|
||||
commonWebpackConfig {
|
||||
outputFileName = "composeApp.js"
|
||||
}
|
||||
testTask {
|
||||
enabled = false
|
||||
}
|
||||
}
|
||||
binaries.executable()
|
||||
}
|
||||
@@ -50,6 +74,37 @@ kotlin {
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// Fix duplicate Skiko runtime files being copied from jsMain and jsTest
|
||||
// during JS test packaging by excluding them from jsTest resources and
|
||||
// making Sync tasks ignore duplicates.
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
// Exclude Skiko runtime files from jsTest processed resources
|
||||
// to prevent overwriting logs during test packaging.
|
||||
@Suppress("UNUSED_VARIABLE")
|
||||
val configureJsTestResources = run {
|
||||
// Configure only if the task exists (JS target present)
|
||||
tasks.matching { it.name == "jsTestProcessResources" && it is Copy }.configureEach {
|
||||
(this as Copy).exclude("skiko.*", "skikod8.mjs")
|
||||
}
|
||||
}
|
||||
|
||||
// Also apply the same exclusion for WASM JS test resources, if present
|
||||
@Suppress("UNUSED_VARIABLE")
|
||||
val configureWasmJsTestResources = run {
|
||||
tasks.matching { it.name == "wasmJsTestProcessResources" && it is Copy }.configureEach {
|
||||
(this as Copy).exclude("skiko.*", "skikod8.mjs")
|
||||
}
|
||||
}
|
||||
|
||||
// Ensure Kotlin/JS generated Sync tasks do not overwrite duplicates noisily
|
||||
@Suppress("UNUSED_VARIABLE")
|
||||
val configureJsCompileSync = run {
|
||||
tasks.matching { it.name.endsWith("CompileSync") && it is Sync }.configureEach {
|
||||
(this as Sync).duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
}
|
||||
}
|
||||
|
||||
compose.desktop {
|
||||
application {
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
package at.mocode
|
||||
|
||||
class JSPlatform: Platform {
|
||||
override val name: String = "JavaScript"
|
||||
}
|
||||
|
||||
actual fun getPlatform(): Platform = JSPlatform()
|
||||
+121
-117
@@ -57,132 +57,132 @@ services:
|
||||
# ===================================================================
|
||||
# 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)
|
||||
|
||||
@@ -225,6 +225,13 @@ services:
|
||||
# start_period: 30s
|
||||
# restart: unless-stopped
|
||||
|
||||
# ===================================================================
|
||||
# Volumes
|
||||
# ===================================================================
|
||||
volumes:
|
||||
ping-service-gradle-cache:
|
||||
driver: local
|
||||
|
||||
# ===================================================================
|
||||
# Networks (shared network from main compose file)
|
||||
# ===================================================================
|
||||
|
||||
@@ -255,6 +255,8 @@ volumes:
|
||||
driver: local
|
||||
grafana-data:
|
||||
driver: local
|
||||
api-gateway-gradle-cache:
|
||||
driver: local
|
||||
|
||||
# ===================================================================
|
||||
# Networks
|
||||
|
||||
@@ -81,6 +81,10 @@ LABEL service="desktop-app" \
|
||||
environment="production" \
|
||||
description="Meldestelle Compose Desktop Application with VNC"
|
||||
|
||||
# Set non-interactive mode and timezone for package installations
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
ENV TZ=Etc/UTC
|
||||
|
||||
# Install system dependencies
|
||||
RUN apt-get update && apt-get install -y \
|
||||
openjdk-21-jre-headless \
|
||||
@@ -92,15 +96,16 @@ RUN apt-get update && apt-get install -y \
|
||||
curl \
|
||||
wget \
|
||||
supervisor \
|
||||
tigervnc-common \
|
||||
tigervnc-standalone-server \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Create application user
|
||||
RUN useradd -m -s /bin/bash appuser && \
|
||||
mkdir -p /home/appuser/.vnc
|
||||
|
||||
# Set up VNC
|
||||
RUN mkdir -p /home/appuser/.vnc && \
|
||||
echo "meldestelle" | vncpasswd -f > /home/appuser/.vnc/passwd && \
|
||||
# Set up VNC password using a separate RUN command
|
||||
RUN echo "meldestelle" | vncpasswd -f > /home/appuser/.vnc/passwd && \
|
||||
chmod 600 /home/appuser/.vnc/passwd && \
|
||||
chown -R appuser:appuser /home/appuser/.vnc
|
||||
|
||||
@@ -125,7 +130,7 @@ RUN echo '#!/bin/bash' > /opt/start-vnc.sh && \
|
||||
echo 'sleep 2' >> /opt/start-vnc.sh && \
|
||||
echo '' >> /opt/start-vnc.sh && \
|
||||
echo '# Start VNC server' >> /opt/start-vnc.sh && \
|
||||
echo 'x11vnc -display :99 -nopw -listen localhost -xkb -ncache 10 -ncache_cr -rfbport $VNC_PORT &' >> /opt/start-vnc.sh && \
|
||||
echo 'x11vnc -display :99 -rfbauth /home/appuser/.vnc/passwd -listen localhost -xkb -ncache 10 -ncache_cr -rfbport $VNC_PORT &' >> /opt/start-vnc.sh && \
|
||||
echo 'sleep 2' >> /opt/start-vnc.sh && \
|
||||
echo '' >> /opt/start-vnc.sh && \
|
||||
echo '# Start noVNC' >> /opt/start-vnc.sh && \
|
||||
|
||||
@@ -58,19 +58,19 @@ ENV GRADLE_OPTS="-Dorg.gradle.caching=true \
|
||||
ENV GRADLE_USER_HOME=/home/gradle/.gradle
|
||||
|
||||
# Install Node.js for Kotlin/Wasm npm operations
|
||||
ARG NODE_VERSION
|
||||
RUN apk add --no-cache \
|
||||
nodejs \
|
||||
npm \
|
||||
curl && \
|
||||
# Verify installation \
|
||||
node --version && \
|
||||
npm --version && \
|
||||
# Create Gradle Node.js directory structure and symlinks \
|
||||
mkdir -p /home/gradle/.gradle/nodejs/node-v22.0.0-linux-x64/bin && \
|
||||
ln -sf /usr/bin/node /home/gradle/.gradle/nodejs/node-v22.0.0-linux-x64/bin/node && \
|
||||
ln -sf /usr/bin/npm /home/gradle/.gradle/nodejs/node-v22.0.0-linux-x64/bin/npm && \
|
||||
chown -R gradle:gradle /home/gradle/.gradle
|
||||
#ARG NODE_VERSION
|
||||
#RUN apk add --no-cache \
|
||||
# nodejs \
|
||||
# npm \
|
||||
# curl && \
|
||||
# # Verify installation \
|
||||
# node --version && \
|
||||
# npm --version && \
|
||||
# # Create Gradle Node.js directory structure and symlinks \
|
||||
# mkdir -p /home/gradle/.gradle/nodejs/node-v22.0.0-linux-x64/bin && \
|
||||
# ln -sf /usr/bin/node /home/gradle/.gradle/nodejs/node-v22.0.0-linux-x64/bin/node && \
|
||||
# ln -sf /usr/bin/npm /home/gradle/.gradle/nodejs/node-v22.0.0-linux-x64/bin/npm && \
|
||||
# chown -R gradle:gradle /home/gradle/.gradle
|
||||
|
||||
# Copy Gradle files first for better layer caching
|
||||
COPY gradle/ gradle/
|
||||
|
||||
@@ -84,7 +84,7 @@ http {
|
||||
|
||||
# API proxy (if needed for backend communication)
|
||||
location /api/ {
|
||||
proxy_pass http://localhost:8081/;
|
||||
proxy_pass http://api-gateway:8081/;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
|
||||
+2
-2
@@ -12,8 +12,8 @@ org.gradle.vfs.watch=true
|
||||
# Für bessere Performance
|
||||
org.gradle.configuration-cache=true
|
||||
|
||||
# Browser für Tests konfigurieren
|
||||
kotlin.js.browser.karma.useChromeHeadless=false
|
||||
# Browser für Tests konfigurieren - verwende Chrome mit Puppeteer
|
||||
kotlin.js.browser.karma.useChromeHeadless=true
|
||||
|
||||
# Security and Reproducibility
|
||||
org.gradle.dependency.verification=lenient
|
||||
|
||||
+851
-18
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user