changefile
This commit is contained in:
parent
3f06b7bcbc
commit
a3d008024e
3 changed files with 0 additions and 0 deletions
21
docker/entrypoint.sh
Normal file
21
docker/entrypoint.sh
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#!/bin/sh
|
||||
|
||||
ROOT_DIR=/app
|
||||
|
||||
# Replace env vars in JavaScript files
|
||||
echo "Replacing env constants in JS"
|
||||
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 $ROOT_DIR/assets/index*.js* $ROOT_DIR/assets/*.js*;
|
||||
do
|
||||
echo "Processing $file ...";
|
||||
|
||||
sed -i 's|VITE_API_URI_CONFIG|'${VITE_API_URI_CONFIG}'|g' $file
|
||||
sed -i 's|VITE_API_PUBLISH_URL|'${VITE_API_PUBLISH_URL}'|g' $file
|
||||
sed -i 's|VITE_MANUAL_URL|'${VITE_MANUAL_URL}'|g' $file
|
||||
sed -i 's|VITE_URL_SSO|'${VITE_URL_SSO}'|g' $file
|
||||
sed -i 's|VITE_API_REPORT_URL|'${VITE_API_REPORT_URL}'|g' $file
|
||||
|
||||
|
||||
done
|
||||
|
||||
echo "Starting Nginx"
|
||||
nginx -g 'daemon off;'
|
||||
Loading…
Add table
Add a link
Reference in a new issue