docker-nginx-brotli icon indicating copy to clipboard operation
docker-nginx-brotli copied to clipboard

sed in bash script, not working

Open Tactless7 opened this issue 3 years ago • 0 comments

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_..."

Tactless7 avatar May 23 '22 14:05 Tactless7