Files
dokku/plugins/nginx-vhosts/post-create
Jose Diaz-Gonzalez fc7ddf34ba 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.
2026-04-24 03:57:22 -04:00

22 lines
522 B
Bash
Executable File

#!/usr/bin/env bash
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
source "$PLUGIN_AVAILABLE_PATH/nginx-vhosts/functions"
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
trigger-nginx-vhosts-post-create() {
declare desc="nginx-vhosts post-create trigger"
declare trigger="post-create"
declare APP="$1"
fn-plugin-property-setup-app "nginx" "$APP"
if [[ "$(plugn trigger proxy-type "$APP")" != "nginx" ]]; then
return
fi
nginx_build_config "$APP"
}
trigger-nginx-vhosts-post-create "$@"