fix(nginx): make post-create executable and guard empty port maps

The post-create trigger was not executable so plugn skipped it.
Also skip generating the 502 config when PROXY_PORT_MAP is empty
(e.g. after ports:clear) to avoid a sigil template index error.
This commit is contained in:
Jose Diaz-Gonzalez
2026-04-24 03:57:22 -04:00
parent 7529d8cb08
commit fc7ddf34ba
2 changed files with 1 additions and 1 deletions

View File

@@ -323,7 +323,7 @@ nginx_build_config() {
IS_DEPLOYED_WITH_LISTENERS=true
fi
if [[ "$IS_DEPLOYED_WITH_LISTENERS" == "true" ]] || { [[ -z "$DOKKU_APP_LISTENERS" ]] && [[ -z "$PASSED_LISTEN_IP_PORT" ]]; }; then
if [[ "$IS_DEPLOYED_WITH_LISTENERS" == "true" ]] || { [[ -z "$DOKKU_APP_LISTENERS" ]] && [[ -z "$PASSED_LISTEN_IP_PORT" ]] && [[ -n "$PROXY_PORT_MAP" ]]; }; then
if [[ "$IS_DEPLOYED_WITH_LISTENERS" == "true" ]]; then
if [[ "$(plugn trigger network-get-static-listeners "$APP" "web")" == "" ]]; then
local IMAGE_TAG=$(get_running_image_tag "$APP")

0
plugins/nginx-vhosts/post-create Normal file → Executable file
View File