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
This commit is contained in:
cynfo3000
2026-03-10 17:43:53 +01:00
parent 54ddc0b902
commit 582eb5c8c1
4 changed files with 63 additions and 1 deletions
+3 -1
View File
@@ -4,7 +4,9 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>frontend</title>
<title>RMM</title>
<!-- Runtime-Konfiguration (wird durch Docker-Entrypoint gesetzt) -->
<script src="/config.js"></script>
</head>
<body>
<div id="root"></div>