Skip to content

Commit

Permalink
change env when runtime docker
Browse files Browse the repository at this point in the history
  • Loading branch information
syafiqparadisam committed Oct 21, 2024
1 parent 5fd2a31 commit 769c70c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions project/env.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 769c70c

Please sign in to comment.