rmm2/frontend/nginx.conf
cynfo3000 582eb5c8c1 Docker: Runtime-Config via window.__RMM_CONFIG__ (kein Rebuild bei Backend-Wechsel)
- Dockerfile: multistage build (node -> nginx)
- docker-entrypoint.sh: injiziert BACKEND_HOST/PORT zur Laufzeit
- nginx.conf: SPA-Routing, config.js no-cache
- index.html: laedt /config.js vor dem React-Bundle

Usage: docker run -e BACKEND_HOST=rmm.example.com -e BACKEND_PORT=8443 -p 80:80 rmm-frontend
2026-03-10 17:43:53 +01:00

22 lines
546 B
Nginx Configuration File

server {
listen 80;
root /usr/share/nginx/html;
index index.html;
# config.js immer frisch laden (kein Cache — enthält Runtime-Config)
location = /config.js {
add_header Cache-Control "no-store";
}
# SPA: alle Routen auf index.html
location / {
try_files $uri $uri/ /index.html;
}
# API-Requests an Backend weiterleiten (optional, falls kein reverse proxy davor)
# location /api/ {
# proxy_pass https://BACKEND_HOST:BACKEND_PORT;
# proxy_ssl_verify off;
# }
}