hrms-user/entrypoint.sh

17 lines
401 B
Bash
Raw Normal View History

2023-08-17 06:19:49 +07:00
#!/bin/sh
ROOT_DIR=/app
# Replace env vars in JavaScript files
echo "Replacing env constants in JS"
2023-09-12 11:59:57 +07:00
for file in $ROOT_DIR/assets/app.*.js* $ROOT_DIR/js/app.*.js* $ROOT_DIR/assets/QSpace-*.js* $ROOT_DIR/index.html $ROOT_DIR/precache-manifest*.js;
2023-08-17 06:19:49 +07:00
do
echo "Processing $file ...";
sed -i 's|VITE_API_URI_CONFIG|'${VITE_API_URI_CONFIG}'|g' $file
done
echo "Starting Nginx"
nginx -g 'daemon off;'