Skip to content

Commit 39e37f0

Browse files
update generate-env.sh
1 parent 88bc820 commit 39e37f0

1 file changed

Lines changed: 0 additions & 13 deletions

File tree

docker/generate-env.sh

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -79,19 +79,6 @@ echo "Nuking all .br and .gz files..."
7979
find /usr/share/nginx/html/console -type f \( -name "*.br" -o -name "*.gz" \) -delete
8080
echo "✓ Nuked all compressed files"
8181

82-
# Replace hardcoded PUBLIC_ values in JavaScript files
83-
# Vite inlines env vars at build time, so we need to replace them in the built JS
84-
echo "Replacing hardcoded env values in JavaScript files..."
85-
for var in $public_vars; do
86-
value=$(printenv "$var")
87-
echo " Replacing $var in JS files..."
88-
89-
# Find all .js files and replace the value
90-
# Match pattern: "PUBLIC_VAR":"old_value" or 'PUBLIC_VAR':'old_value'
91-
find /usr/share/nginx/html/console -type f -name "*.js" -exec sed -i "s|\"$var\":\"[^\"]*\"|\"$var\":\"$value\"|g" {} \;
92-
done
93-
echo "✓ Replaced env values in JS files"
94-
9582
echo "========================================="
9683
echo "Starting nginx..."
9784
echo "========================================="

0 commit comments

Comments
 (0)