feat: add environment variable handling in Dockerfile and update Firebase configuration

This commit is contained in:
2025-02-16 11:38:30 -03:00
parent e5af3b8c51
commit 1f2a71452b
3 changed files with 22 additions and 16 deletions
+12
View File
@@ -0,0 +1,12 @@
#!/bin/sh
for i in $(env | grep MY_APP_)
do
key=$(echo $i | cut -d '=' -f 1)
value=$(echo $i | cut -d '=' -f 2-)
echo $key=$value
# sed All files
# find /usr/share/nginx/html -type f -exec sed -i "s|${key}|${value}|g" '{}' +
# sed JS and CSS only
find /usr/share/nginx/html -type f \( -name '*.js' -o -name '*.css' \) -exec sed -i "s|${key}|${value}|g" '{}' +
done