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:
+3
-1
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user