diff --git a/plugins/nginx-vhosts/commands b/plugins/nginx-vhosts/commands index 3600965e0..079774ad0 100755 --- a/plugins/nginx-vhosts/commands +++ b/plugins/nginx-vhosts/commands @@ -49,6 +49,9 @@ case "$1" in shopt -u nullglob fi + DOKKU_APP_CONTAINER_ID=$(< "$DOKKU_ROOT/$APP/CONTAINER") + docker cp "$DOKKU_APP_CONTAINER_ID:/app/nginx.conf" "$APP_NGINX_TEMPLATE" 2> /dev/null || true + [[ -f "$DOKKU_ROOT/ENV" ]] && source $DOKKU_ROOT/ENV [[ -f "$DOKKU_ROOT/$APP/ENV" ]] && source $DOKKU_ROOT/$APP/ENV [[ -f "$APP_NGINX_TEMPLATE" ]] && NGINX_TEMPLATE="$APP_NGINX_TEMPLATE" && NGINX_CUSTOM_TEMPLATE="true" && dokku_log_info1 'Overriding default nginx.conf with detected nginx.conf.template'