removed sh script

This commit is contained in:
2026-06-08 19:46:50 +02:00
parent ea18228299
commit 1928068499
5 changed files with 1 additions and 25 deletions
-3
View File
@@ -13,9 +13,6 @@ FROM nginx:alpine AS runner
WORKDIR /usr/share/nginx/html
COPY --from=builder /app/dist .
COPY docker-entrypoint.d/10-runtime-env.sh /docker-entrypoint.d/10-runtime-env.sh
RUN chmod +x /docker-entrypoint.d/10-runtime-env.sh
COPY nginx.conf /etc/nginx/templates/default.conf.template
EXPOSE 80
@@ -1,10 +0,0 @@
#!/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
-1
View File
@@ -8,7 +8,6 @@
</head>
<body>
<div id="root"></div>
<script src="/env.js"></script>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
+1 -10
View File
@@ -1,13 +1,4 @@
type WindowWithEnv = Window & {
__ENV?: {
VITE_BACKEND_URL?: string;
};
};
const runtimeEnv = (globalThis as unknown as WindowWithEnv).__ENV;
export const API_BASE =
runtimeEnv?.VITE_BACKEND_URL ||
(import.meta as any).env?.VITE_BACKEND_URL ||
import.meta.env.VITE_BACKEND_URL ||
"http://localhost:8004";
"/backend";