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.
22 lines
522 B
Bash
Executable File
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 "$@"
|