fixing frontend Docker Anpassungen
This commit is contained in:
@@ -15,21 +15,20 @@ 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 docs ./docs
|
||||
COPY services ./services
|
||||
|
||||
# Setze Gradle-Wrapper Berechtigung
|
||||
RUN chmod +x ./gradlew
|
||||
|
||||
# Dependencies downloaden (für besseres Caching)
|
||||
RUN ./gradlew :client:dependencies --no-configure-on-demand
|
||||
RUN ./gradlew :clients:app:dependencies --no-configure-on-demand
|
||||
|
||||
# Kotlin/WASM Web-App kompilieren
|
||||
RUN ./gradlew :client:wasmJsBrowserDistribution --no-configure-on-demand
|
||||
# Kotlin/JS Web-App kompilieren (PRODUCTION Build)
|
||||
RUN ./gradlew :clients:app:jsBrowserDistribution --no-configure-on-demand -Pproduction=true
|
||||
|
||||
# ===================================================================
|
||||
# Stage 2: Runtime Stage - Nginx für Static Files + API Proxy
|
||||
@@ -40,7 +39,7 @@ FROM nginx:1.25-alpine
|
||||
RUN apk add --no-cache curl
|
||||
|
||||
# Kopiere kompilierte Web-App von Build-Stage
|
||||
COPY --from=builder /app/client/build/dist/wasmJs/productionExecutable/ /usr/share/nginx/html/
|
||||
COPY --from=builder /app/clients/app/build/dist/js/productionExecutable/ /usr/share/nginx/html/
|
||||
|
||||
# Kopiere Nginx-Konfiguration
|
||||
COPY dockerfiles/clients/web-app/nginx.conf /etc/nginx/nginx.conf
|
||||
|
||||
@@ -3,22 +3,40 @@
|
||||
# Static Files + API Proxy zu Gateway
|
||||
# ===================================================================
|
||||
|
||||
# Worker-Prozesse (konfigurierbar über NGINX_WORKER_PROCESSES)
|
||||
worker_processes auto;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
use epoll;
|
||||
multi_accept on;
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
# Performance Optimizations
|
||||
sendfile on;
|
||||
tcp_nopush on;
|
||||
tcp_nodelay on;
|
||||
keepalive_timeout 65;
|
||||
types_hash_max_size 2048;
|
||||
|
||||
# Gzip Kompression für bessere Performance
|
||||
gzip on;
|
||||
gzip_vary on;
|
||||
gzip_min_length 1024;
|
||||
gzip_comp_level 6;
|
||||
gzip_types
|
||||
text/plain
|
||||
text/css
|
||||
@@ -26,7 +44,8 @@ http {
|
||||
text/javascript
|
||||
application/javascript
|
||||
application/xml+rss
|
||||
application/json;
|
||||
application/json
|
||||
application/wasm;
|
||||
|
||||
# Upstream für API Gateway
|
||||
upstream api-gateway {
|
||||
|
||||
Reference in New Issue
Block a user