Allow overriding of the nginx.conf template via nginx.conf.template

This commit is contained in:
Jose Diaz-Gonzalez committed 2014-12-11 01:36:44 -05:00
1 parent a6c34ddd6f
commit b967514c55
1 file changed
+6
+6
View File
@@ -54,6 +54,12 @@ EOF
SCHEME="https" SCHEME="https"
fi fi
APP_NGINX_TEMPLATE="$DOKKU_ROOT/$APP/nginx.conf.template"
if [[ -f $APP_NGINX_TEMPLATE ]]; then
echo "-----> Overriding default nginx.conf with detected nginx.conf.template"
NGINX_CONF=$APP_NGINX_TEMPLATE
fi
echo "-----> Creating $SCHEME nginx.conf" echo "-----> Creating $SCHEME nginx.conf"
echo "upstream $APP { server 127.0.0.1:$PORT; }" > $DOKKU_ROOT/$APP/nginx.conf echo "upstream $APP { server 127.0.0.1:$PORT; }" > $DOKKU_ROOT/$APP/nginx.conf
eval "cat <<< \"$(< $NGINX_CONF)\" >> $DOKKU_ROOT/$APP/nginx.conf" eval "cat <<< \"$(< $NGINX_CONF)\" >> $DOKKU_ROOT/$APP/nginx.conf"