From d5d2b3fcbaab8a93ca451500c59a4a19fd759db3 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sun, 20 Aug 2023 11:30:29 -0400 Subject: [PATCH] fix: ensure ports are properly retrieved for newer dokku Closes #37 --- nginx-pre-reload | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nginx-pre-reload b/nginx-pre-reload index 726b13e..eefe10b 100755 --- a/nginx-pre-reload +++ b/nginx-pre-reload @@ -26,6 +26,9 @@ redirect_nginx_pre_load_trigger() { local NGINX_CONF="$APP_ROOT/nginx.conf" local NGINX_TEMPLATE="$(dirname "$0")/templates/nginx.conf.sigil" local PROXY_PORT_MAP=$(config_get "$APP" DOKKU_PROXY_PORT_MAP || true) + if [[ -z "$PROXY_PORT_MAP" ]]; then + PROXY_PORT_MAP="$(plugn trigger ports-get "$APP" | xargs)" + fi PROXY_PORT_MAP="$(echo -e "${PROXY_PORT_MAP}" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')" local NGINX_LOCATION=$(get_nginx_location) if [[ -z "$NGINX_LOCATION" ]]; then