From b967514c5514c03bdc08f43d853d1f009df312ec Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 24 Nov 2014 01:41:05 -0500 Subject: [PATCH] Allow overriding of the nginx.conf template via nginx.conf.template --- plugins/nginx-vhosts/post-deploy | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/nginx-vhosts/post-deploy b/plugins/nginx-vhosts/post-deploy index 7365bc915..1bc802a92 100755 --- a/plugins/nginx-vhosts/post-deploy +++ b/plugins/nginx-vhosts/post-deploy @@ -54,6 +54,12 @@ EOF SCHEME="https" 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 "upstream $APP { server 127.0.0.1:$PORT; }" > $DOKKU_ROOT/$APP/nginx.conf eval "cat <<< \"$(< $NGINX_CONF)\" >> $DOKKU_ROOT/$APP/nginx.conf"