added script to run with .env

This commit is contained in:
2026-06-04 18:45:27 +02:00
parent 1af79461b1
commit 7045e3dfd1
4 changed files with 23 additions and 0 deletions
@@ -0,0 +1,10 @@
#!/bin/sh
set -eu
VITE_BACKEND_URL_VALUE="${VITE_BACKEND_URL:-/backend}"
cat > /usr/share/nginx/html/env.js <<EOF
window.__ENV = {
VITE_BACKEND_URL: "${VITE_BACKEND_URL_VALUE}"
};
EOF