Files
weather-demo/start-nginx.sh
Kamil Klecha ebab360f22
All checks were successful
continuous-integration/drone/push Build is passing
CICD-test
2021-10-20 00:54:19 +02:00

9 lines
282 B
Bash

#!/usr/bin/env sh
cp /usr/share/nginx/html/js/*.js /tmp
export EXISTING_VARS=$(printenv | awk -F= '{print $1}' | sed 's/^/\$/g' | paste -sd,);
for file in /tmp/*.js;
do
cat $file | envsubst $EXISTING_VARS | tee /usr/share/nginx/html/js/$(basename $file)
done
nginx -g 'daemon off;'