diff --git a/project/env.sh b/project/env.sh new file mode 100644 index 0000000..de11626 --- /dev/null +++ b/project/env.sh @@ -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 \ No newline at end of file