diff --git a/frontend/10-generate-env.sh b/frontend/10-generate-env.sh index 222fab2..393e41e 100644 --- a/frontend/10-generate-env.sh +++ b/frontend/10-generate-env.sh @@ -1,32 +1,23 @@ #!/bin/sh set -e -# Template is in dist (copied by Dockerfile builder stage) -TEMPLATE="/usr/share/nginx/html/env.js.template" +# Generate env.js from API_BASE environment variable +# This is set in the Helm deployment values TARGET="/usr/share/nginx/html/env.js" -if [ -f "$TEMPLATE" ]; then - echo "Generating env.js from template with API_BASE=${API_BASE:-/api}" - # Default API_BASE to /api if not provided - : ${API_BASE:=/api} +# API_BASE should be set via deployment env (e.g., from Helm values) +# Default to /api as fallback (relative path) +: ${API_BASE:=/api} - cat > "$TARGET" < "$TARGET" < "$TARGET" <