fixing Web-App Dockerfile
This commit is contained in:
@@ -9,23 +9,27 @@ FROM gradle:8-jdk21-alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Kopiere Gradle-Konfiguration
|
||||
# Kopiere Gradle-Konfiguration und Wrapper
|
||||
COPY build.gradle.kts settings.gradle.kts gradle.properties ./
|
||||
COPY gradle ./gradle
|
||||
COPY gradlew ./
|
||||
|
||||
# Kopiere alle notwendigen Module für Multi-Modul-Projekt
|
||||
COPY client ./client
|
||||
COPY clients ./clients
|
||||
COPY core ./core
|
||||
COPY platform ./platform
|
||||
COPY infrastructure ./infrastructure
|
||||
COPY temp ./temp
|
||||
COPY services ./services
|
||||
COPY docs ./docs
|
||||
|
||||
# Setze Gradle-Wrapper Berechtigung
|
||||
RUN chmod +x ./gradlew
|
||||
|
||||
# Dependencies downloaden (für besseres Caching)
|
||||
RUN gradle :client:dependencies --no-configure-on-demand
|
||||
RUN ./gradlew :clients:app:dependencies --no-configure-on-demand
|
||||
|
||||
# Desktop-App kompilieren (createDistributable für native Distribution)
|
||||
RUN gradle :client:createDistributable --no-configure-on-demand
|
||||
RUN ./gradlew :clients:app:createDistributable --no-configure-on-demand
|
||||
|
||||
# ===================================================================
|
||||
# Stage 2: Runtime Stage - Ubuntu mit VNC + noVNC
|
||||
@@ -54,7 +58,7 @@ RUN apt-get update && apt-get install -y \
|
||||
WORKDIR /app
|
||||
|
||||
# Kopiere kompilierte Desktop-App von Build-Stage
|
||||
COPY --from=builder /app/client/build/compose/binaries/main/desktop/ ./desktop-app/
|
||||
COPY --from=builder /app/clients/app/build/compose/binaries/main/desktop/ ./desktop-app/
|
||||
|
||||
# Kopiere Scripts
|
||||
COPY dockerfiles/clients/desktop-app/entrypoint.sh /entrypoint.sh
|
||||
|
||||
@@ -5,7 +5,13 @@
|
||||
# ===================================================================
|
||||
# Stage 1: Build Stage - Kotlin/JS kompilieren
|
||||
# ===================================================================
|
||||
FROM gradle:8-jdk21-alpine AS builder
|
||||
FROM gradle:8-jdk21 AS builder
|
||||
|
||||
# Install Node.js and npm for Kotlin/JS builds (Ubuntu-based image has better Node.js compatibility)
|
||||
RUN apt-get update && apt-get install -y curl && \
|
||||
curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \
|
||||
apt-get install -y nodejs && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
@@ -20,6 +26,7 @@ COPY core ./core
|
||||
COPY platform ./platform
|
||||
COPY infrastructure ./infrastructure
|
||||
COPY services ./services
|
||||
COPY docs ./docs
|
||||
|
||||
# Setze Gradle-Wrapper Berechtigung
|
||||
RUN chmod +x ./gradlew
|
||||
|
||||
@@ -16,11 +16,6 @@ http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
# WASM MIME-Type für zukünftige Builds
|
||||
location ~ \.wasm$ {
|
||||
add_header Content-Type application/wasm;
|
||||
}
|
||||
|
||||
# Logging
|
||||
access_log /var/log/nginx/access.log;
|
||||
error_log /var/log/nginx/error.log;
|
||||
@@ -68,6 +63,13 @@ http {
|
||||
expires 1y;
|
||||
add_header Cache-Control "public, immutable";
|
||||
}
|
||||
|
||||
# WASM Files mit korrektem MIME-Type
|
||||
location ~* \.wasm$ {
|
||||
add_header Content-Type application/wasm;
|
||||
expires 1y;
|
||||
add_header Cache-Control "public, immutable";
|
||||
}
|
||||
}
|
||||
|
||||
# Proxy API calls zu Gateway
|
||||
|
||||
Reference in New Issue
Block a user