Build ui for prod
This commit is contained in:
@@ -5,8 +5,18 @@ mkdir -p /etc/nginx/templates
|
||||
|
||||
if [ "$NGINX_SSL_ENABLED" = "true" ]; then
|
||||
echo "Using SSL configuration"
|
||||
cp /templates/ssl.conf.template /etc/nginx/templates/default.conf.template
|
||||
cp /templates/ssl.conf.template /templates/default.conf.template
|
||||
else
|
||||
echo "Using non-SSL configuration"
|
||||
cp /templates/nossl.conf.template /etc/nginx/templates/default.conf.template
|
||||
cp /templates/nossl.conf.template /templates/default.conf.template
|
||||
fi
|
||||
|
||||
if [ "$ENVIRONMENT" = "production" ]; then
|
||||
export UI_ROOT="/usr/share/nginx/html"
|
||||
echo "Setting production root to ${UI_ROOT}"
|
||||
else
|
||||
export UI_ROOT="/home"
|
||||
echo "Setting development root to ${UI_ROOT}"
|
||||
fi
|
||||
|
||||
envsubst '$UI_ROOT' < /templates/default.conf.template > /etc/nginx/templates/default.conf.template
|
||||
|
||||
Reference in New Issue
Block a user