Skip to content

Commit

Permalink
changement path env-config
Browse files Browse the repository at this point in the history
  • Loading branch information
cdebarros committed Feb 20, 2024
1 parent d6fd212 commit 1daca82
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

# Recreate config file
# rm -rf ./env-config.js
touch /mem/env-config.js
touch /tmp/env-config.js

# Add assignment
echo "window._env_ = {" >> /mem/env-config.js
echo "window._env_ = {" >> /tmp/env-config.js

# Read each line in .env file
# Each line represents key=value pairs
Expand All @@ -23,9 +23,9 @@ do
[[ -z $value ]] && value=${varvalue}

# Append configuration property to JS file
echo " $varname: \"$value\"," >> /mem/env-config.js
echo " $varname: \"$value\"," >> /tmp/env-config.js
done < .env

echo "}" >> /mem/env-config.js
echo "}" >> /tmp/env-config.js

mv /mem/env-config.js /usr/share/nginx/html/
mv /tmp/env-config.js /usr/share/nginx/html/

0 comments on commit 1daca82

Please # to comment.