docker-nginx-brotli
docker-nginx-brotli copied to clipboard
sed in bash script, not working
Hello, I recently used the docker image fholzer/nginx-brotli:v1.21.6 but my entrypoint is not working anymore. I don't understand why. I previously was on nginx::1.21.0-alpine
echo "Replacing env constants in JS"
for file in $ROOT_DIR/js/app.*.js* $ROOT_DIR/js/chunk-*.*.js* $ROOT_DIR/js/*.js* $ROOT_DIR/index.html $ROOT_DIR/precache-manifest*.js;
do
echo "Processing $file ...";
sed -i 's|will_change_for_VUE_APP_API_URL|'${VUE_APP_API_URL}'|g' $file
sed -i 's|will_change_for_BASE_URL|'${BASE_URL}'|g' $file
done
echo "Starting Nginx"
nginx -g 'daemon off;'
The sed command seems to replace the value. But when I run my container, the env var is not correct one, and I still get 'will_change_for_..."