Skip to content
Snippets Groups Projects
Verified Commit b1b1eb38 authored by jfriedli's avatar jfriedli
Browse files

updated container entrypoint to envsubst the index.html as well

parent 33aa0135
No related branches found
No related tags found
2 merge requests!332Prepare new release,!331Resolve "redirect to no script does not work"
Pipeline #42656 passed
#!/bin/sh
# Replace env vars in JavaScript files
echo "Replacing env vars in JS"
echo "Replacing env vars in JS/HTML"
cp -r /var/templates/* /var/www/html/
echo "Set API Url to: $MAT_API_HOST_PLACEHOLDER"
......@@ -17,5 +17,11 @@ do
rm $file.tmpl.js
done
echo "Processing index.html ...";
cp /var/www/html/index.html /var/www/html/index.html.tmpl.html
envsubst '$MAT_API_HOST_PLACEHOLDER' < /var/www/html/index.html.tmpl.html > /var/www/html/index.html
rm /var/www/html/index.html.tmpl.html
cat /var/www/html/index.html
echo "Starting Nginx"
nginx -g 'daemon off;'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment