Some checks failed
Docker Images bauen und pushen / build-and-push (push) Has been cancelled
CI/CD: - .gitea/workflows/docker-publish.yml: baut + pusht bei Push auf release und Tags - Images: git.cynfo.net/christian/rmm2/backend:latest + frontend:latest - Gitea Secrets: REGISTRY_USER + REGISTRY_PASSWORD gesetzt Runtime-Konfiguration (kein Rebuild bei IP-Aenderung): - frontend/docker-entrypoint.sh: generiert runtime-config.js aus ENV-Vars beim Start - frontend/src/config.js: window.__RMM_CONFIG__ (Docker) vor Vite-ENV (in .gitignore, nicht im release-Commit) - frontend/public/runtime-config.js: leerer Fallback fuer lokale Entwicklung - frontend/index.html: laedt /runtime-config.js vor dem App-Bundle docker-compose: - Nutzt fertige Images aus der Gitea Registry - docker-compose.build.yml: Override fuer lokalen Build - Alle Frontend-Werte via ENV zur Laufzeit
14 lines
346 B
Bash
14 lines
346 B
Bash
#!/bin/sh
|
|
# Generiert /usr/share/nginx/html/runtime-config.js aus ENV-Variablen
|
|
# Wird beim Container-Start ausgefuehrt
|
|
|
|
cat > /usr/share/nginx/html/runtime-config.js << EOF
|
|
window.__RMM_CONFIG__ = {
|
|
backendHost: "${BACKEND_HOST:-localhost}",
|
|
backendPort: "${BACKEND_PORT:-8443}",
|
|
apiKey: "${API_KEY:-}"
|
|
};
|
|
EOF
|
|
|
|
exec nginx -g "daemon off;"
|