Merge pull request #18

* MP-19 Refactoring: Einführung der "Registry" & "Masterdata" Trennung …

* MP-19 Refactoring: Frontend Tabula Rasa

* MP-19 Refactoring: Frontend Tabula Rasa

* refactoring:

* MP-20 fix(docker/clients): include `:domains` module in web/desktop b…

* MP-20 fix(web-app build): resolve JS compile error and add dev/prod b…

* MP-20 fix(web-app): remove vendor.js reference and harden JS bootstra…

* MP-20 fixing: clients

* MP-20 fixing: clients
This commit is contained in:
StefanMo
2025-11-30 14:13:12 +01:00
committed by GitHub
parent 596a05b69c
commit 9ea2b74a81
254 changed files with 5485 additions and 15971 deletions
@@ -17,6 +17,7 @@ COPY gradlew ./
# Kopiere alle notwendigen Module für Multi-Modul-Projekt
COPY clients ./clients
COPY core ./core
COPY domains ./domains
COPY platform ./platform
COPY infrastructure ./infrastructure
COPY services ./services
+20 -6
View File
@@ -9,6 +9,9 @@
ARG GRADLE_VERSION
ARG JAVA_VERSION
ARG NODE_VERSION
ARG NGINX_IMAGE_TAG=1.28.0-alpine
# Toggle build profile: dev (default) or prod
ARG WEB_BUILD_PROFILE=dev
FROM gradle:${GRADLE_VERSION}-jdk${JAVA_VERSION} AS builder
# Install Node.js (version aligned with versions.toml)
@@ -29,6 +32,7 @@ COPY gradlew ./
# Kopiere alle notwendigen Module für Multi-Modul-Projekt
COPY clients ./clients
COPY core ./core
COPY domains ./domains
COPY platform ./platform
COPY infrastructure ./infrastructure
COPY services ./services
@@ -40,21 +44,28 @@ RUN chmod +x ./gradlew
# Dependencies downloaden (für besseres Caching)
RUN ./gradlew :clients:app:dependencies --no-configure-on-demand
# Kotlin/JS Web-App kompilieren (PRODUCTION Build)
RUN ./gradlew :clients:app:jsBrowserDistribution --no-configure-on-demand -Pproduction=true
# Kotlin/JS Web-App kompilieren (Profil wählbar über WEB_BUILD_PROFILE)
# - dev → jsBrowserDevelopmentExecutable (schneller, Source Maps)
# - prod → jsBrowserDistribution (minifiziert, optimiert)
RUN if [ "$WEB_BUILD_PROFILE" = "prod" ]; then \
./gradlew :clients:app:jsBrowserDistribution --no-configure-on-demand -Pproduction=true; \
mkdir -p /app/web-dist && cp -r clients/app/build/dist/js/productionExecutable/* /app/web-dist/; \
else \
./gradlew :clients:app:jsBrowserDevelopmentExecutable --no-configure-on-demand; \
mkdir -p /app/web-dist && cp -r clients/app/build/dist/js/developmentExecutable/* /app/web-dist/; \
fi
# ===================================================================
# Stage 2: Runtime Stage - Nginx für Static Files + API Proxy
# ===================================================================
# Build arg controls runtime base image tag (build-time only)
ARG NGINX_IMAGE_TAG
# Build arg controls runtime base image tag (declared globally to allow usage in FROM)
FROM nginx:${NGINX_IMAGE_TAG}
# Installiere curl für Health-Checks
RUN apk add --no-cache curl
# Kopiere kompilierte Web-App von Build-Stage
COPY --from=builder /app/clients/app/build/dist/js/productionExecutable/ /usr/share/nginx/html/
# Kopiere kompilierte Web-App von Build-Stage (vereinheitlichtes Ausgabeverzeichnis)
COPY --from=builder /app/web-dist/ /usr/share/nginx/html/
# Kopiere Nginx-Konfiguration
COPY dockerfiles/clients/web-app/nginx.conf /etc/nginx/nginx.conf
@@ -62,6 +73,9 @@ COPY dockerfiles/clients/web-app/nginx.conf /etc/nginx/nginx.conf
# Exponiere Port 4000 (statt Standard 80)
EXPOSE 4000
# Downloads (Platzhalter) ausliefern lassen
COPY dockerfiles/clients/web-app/downloads/ /usr/share/nginx/html/downloads/
# Health-Check für Container
HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \
CMD curl -f http://localhost:4000/ || exit 1
@@ -0,0 +1,30 @@
<!doctype html>
<html lang="de">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Meldestelle Desktop Downloads (Platzhalter)</title>
<style>
body { font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, 'Helvetica Neue', Arial, 'Noto Sans', 'Liberation Sans', sans-serif; margin: 2rem; }
h1 { margin-bottom: .25rem; }
.muted { color: #666; }
ul { line-height: 1.8; }
.card { border: 1px solid #e5e7eb; border-radius: 8px; padding: 1rem 1.25rem; max-width: 720px; }
</style>
</head>
<body>
<h1>Desktop Downloads</h1>
<p class="muted">Platzhalter-Verzeichnis. Hier können zukünftig Installer/Archive der Desktop-App bereitgestellt werden.</p>
<div class="card">
<p>Lege deine Dateien in dieses Verzeichnis im Repository:</p>
<pre><code>dockerfiles/clients/web-app/downloads/</code></pre>
<p>Oder mounte in Docker Compose ein Host-Verzeichnis auf <code>/usr/share/nginx/html/downloads</code>.</p>
<p>Beispiele (geplant):</p>
<ul>
<li>Meldestelle-Setup-1.0.0.msi (Windows)</li>
<li>Meldestelle-1.0.0.dmg (macOS)</li>
<li>Meldestelle-1.0.0.deb (Linux)</li>
</ul>
</div>
</body>
</html>
@@ -60,6 +60,9 @@ COPY core/ core/
# Copy infrastructure directories (required by settings.gradle.kts)
COPY infrastructure/ infrastructure/
# Copy domains directory (required by settings.gradle.kts)
COPY domains/ domains/
# Copy services directories (required by settings.gradle.kts)
COPY services/ services/
@@ -60,6 +60,9 @@ COPY core/ core/
# Copy infrastructure directories (required by settings.gradle.kts)
COPY infrastructure/ infrastructure/
# Copy domains directory (required by settings.gradle.kts)
COPY domains/ domains/
# Copy services directories (required by settings.gradle.kts)
COPY services/ services/