don't build nginx config if the app has not been deployed. closes #1806

This commit is contained in:
Michael Hobbs committed 2016-01-07 10:25:47 -08:00
1 parent bfecd3beb4
commit 50194e5923
1 file changed
+7 -2
+7 -2
View File
@@ -235,8 +235,13 @@ EOF
echo "}" >> $NGINX_CONF
fi
dokku_log_info1 "Creating $SCHEME nginx.conf"
mv $NGINX_CONF "$DOKKU_ROOT/$APP/nginx.conf"
if is_deployed "$APP"; then
dokku_log_info1 "Creating $SCHEME nginx.conf"
mv $NGINX_CONF "$DOKKU_ROOT/$APP/nginx.conf"
else
dokku_log_info1 "App $APP has not been deployed. Skipping nginx config creation"
rm -f $NGINX_CONF
fi
if is_deployed "$APP"; then
dokku_log_info1 "Running nginx-pre-reload"