#!/bin/sh # Injiziert BACKEND_HOST/PORT zur Laufzeit in window.__RMM_CONFIG__ # So muss das Image nicht neu gebaut werden wenn sich der Backend-Host ändert CONFIG_JS="/usr/share/nginx/html/config.js" cat > "$CONFIG_JS" << EOF // Injiziert durch Docker-Entrypoint window.__RMM_CONFIG__ = { backendHost: "${BACKEND_HOST}", backendPort: "${BACKEND_PORT}" }; EOF echo "RMM Frontend: Backend = https://${BACKEND_HOST}:${BACKEND_PORT}" exec "$@"