mirror of
https://codeberg.org/dragongoose/safetwitch.git
synced 2024-09-06 08:42:31 +00:00
15 lines
425 B
Bash
15 lines
425 B
Bash
|
#!/bin/sh
|
||
|
|
||
|
ROOT_DIR=/app
|
||
|
|
||
|
# Replace env vars in files served by NGINX
|
||
|
for file in $ROOT_DIR/assets/*.js $ROOT_DIR/index.html;
|
||
|
do
|
||
|
sed -i 's|VITE_BACKEND_DOMAIN_PLACEHOLDER|'${VITE_BACKEND_DOMAIN}'|g' $file
|
||
|
sed -i 's|VITE_INSTANCE_DOMAIN_PLACEHOLDER|'${VITE_INSTANCE_DOMAIN}'|g' $file
|
||
|
sed -i 's|VITE_HTTPS_PLACEHOLDER|'${VITE_HTTPS}'|g' $file
|
||
|
# Your other variables here...
|
||
|
done
|
||
|
|
||
|
# Starting NGINX
|
||
|
nginx -g 'daemon off;'
|