fixing frontend Docker Anpassungen
This commit is contained in:
-1
@@ -1,6 +1,5 @@
|
|||||||
package at.mocode.clients.shared.commonui.components
|
package at.mocode.clients.shared.commonui.components
|
||||||
|
|
||||||
import androidx.compose.foundation.layout.Column
|
|
||||||
import androidx.compose.foundation.layout.PaddingValues
|
import androidx.compose.foundation.layout.PaddingValues
|
||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||||
|
|||||||
@@ -28,11 +28,16 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: dockerfiles/clients/web-app/Dockerfile
|
dockerfile: dockerfiles/clients/web-app/Dockerfile
|
||||||
|
args:
|
||||||
|
- BUILD_DATE=${BUILD_DATE:-$(date -u +"%Y-%m-%dT%H:%M:%SZ")}
|
||||||
|
- VERSION=${APP_VERSION:-1.0.0}
|
||||||
container_name: meldestelle-web-app
|
container_name: meldestelle-web-app
|
||||||
environment:
|
environment:
|
||||||
NODE_ENV: ${NODE_ENV:-production}
|
NODE_ENV: ${NODE_ENV:-production}
|
||||||
APP_TITLE: ${APP_NAME:-Meldestelle}
|
APP_TITLE: ${APP_NAME:-Meldestelle}
|
||||||
APP_VERSION: ${APP_VERSION:-1.0.0}
|
APP_VERSION: ${APP_VERSION:-1.0.0}
|
||||||
|
# Nginx Worker Processes (für Performance)
|
||||||
|
NGINX_WORKER_PROCESSES: ${NGINX_WORKER_PROCESSES:-auto}
|
||||||
ports:
|
ports:
|
||||||
- "4000:4000"
|
- "4000:4000"
|
||||||
networks:
|
networks:
|
||||||
|
|||||||
@@ -15,21 +15,20 @@ COPY gradle ./gradle
|
|||||||
COPY gradlew ./
|
COPY gradlew ./
|
||||||
|
|
||||||
# Kopiere alle notwendigen Module für Multi-Modul-Projekt
|
# Kopiere alle notwendigen Module für Multi-Modul-Projekt
|
||||||
COPY client ./client
|
COPY clients ./clients
|
||||||
COPY core ./core
|
COPY core ./core
|
||||||
COPY platform ./platform
|
COPY platform ./platform
|
||||||
COPY infrastructure ./infrastructure
|
COPY infrastructure ./infrastructure
|
||||||
COPY temp ./temp
|
COPY services ./services
|
||||||
COPY docs ./docs
|
|
||||||
|
|
||||||
# Setze Gradle-Wrapper Berechtigung
|
# Setze Gradle-Wrapper Berechtigung
|
||||||
RUN chmod +x ./gradlew
|
RUN chmod +x ./gradlew
|
||||||
|
|
||||||
# Dependencies downloaden (für besseres Caching)
|
# 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
|
# Kotlin/JS Web-App kompilieren (PRODUCTION Build)
|
||||||
RUN ./gradlew :client:wasmJsBrowserDistribution --no-configure-on-demand
|
RUN ./gradlew :clients:app:jsBrowserDistribution --no-configure-on-demand -Pproduction=true
|
||||||
|
|
||||||
# ===================================================================
|
# ===================================================================
|
||||||
# Stage 2: Runtime Stage - Nginx für Static Files + API Proxy
|
# 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
|
RUN apk add --no-cache curl
|
||||||
|
|
||||||
# Kopiere kompilierte Web-App von Build-Stage
|
# 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
|
# Kopiere Nginx-Konfiguration
|
||||||
COPY dockerfiles/clients/web-app/nginx.conf /etc/nginx/nginx.conf
|
COPY dockerfiles/clients/web-app/nginx.conf /etc/nginx/nginx.conf
|
||||||
|
|||||||
@@ -3,22 +3,40 @@
|
|||||||
# Static Files + API Proxy zu Gateway
|
# Static Files + API Proxy zu Gateway
|
||||||
# ===================================================================
|
# ===================================================================
|
||||||
|
|
||||||
|
# Worker-Prozesse (konfigurierbar über NGINX_WORKER_PROCESSES)
|
||||||
|
worker_processes auto;
|
||||||
|
|
||||||
events {
|
events {
|
||||||
worker_connections 1024;
|
worker_connections 1024;
|
||||||
|
use epoll;
|
||||||
|
multi_accept on;
|
||||||
}
|
}
|
||||||
|
|
||||||
http {
|
http {
|
||||||
include /etc/nginx/mime.types;
|
include /etc/nginx/mime.types;
|
||||||
default_type application/octet-stream;
|
default_type application/octet-stream;
|
||||||
|
|
||||||
|
# WASM MIME-Type für zukünftige Builds
|
||||||
|
location ~ \.wasm$ {
|
||||||
|
add_header Content-Type application/wasm;
|
||||||
|
}
|
||||||
|
|
||||||
# Logging
|
# Logging
|
||||||
access_log /var/log/nginx/access.log;
|
access_log /var/log/nginx/access.log;
|
||||||
error_log /var/log/nginx/error.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 Kompression für bessere Performance
|
||||||
gzip on;
|
gzip on;
|
||||||
gzip_vary on;
|
gzip_vary on;
|
||||||
gzip_min_length 1024;
|
gzip_min_length 1024;
|
||||||
|
gzip_comp_level 6;
|
||||||
gzip_types
|
gzip_types
|
||||||
text/plain
|
text/plain
|
||||||
text/css
|
text/css
|
||||||
@@ -26,7 +44,8 @@ http {
|
|||||||
text/javascript
|
text/javascript
|
||||||
application/javascript
|
application/javascript
|
||||||
application/xml+rss
|
application/xml+rss
|
||||||
application/json;
|
application/json
|
||||||
|
application/wasm;
|
||||||
|
|
||||||
# Upstream für API Gateway
|
# Upstream für API Gateway
|
||||||
upstream api-gateway {
|
upstream api-gateway {
|
||||||
|
|||||||
Reference in New Issue
Block a user