2023-01-21 14:55:41 -05:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
set -eo pipefail
|
|
|
|
|
[[ $DOKKU_TRACE ]] && set -x
|
|
|
|
|
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
|
|
|
|
source "$PLUGIN_AVAILABLE_PATH/nginx-vhosts/functions"
|
|
|
|
|
|
|
|
|
|
trigger-nginx-vhosts-scheduler-post-deploy-process() {
|
|
|
|
|
declare desc="nginx-vhosts scheduler-post-deploy-process plugin trigger"
|
|
|
|
|
declare trigger="scheduler-post-deploy-process"
|
|
|
|
|
declare APP="$1" PROCESS_TYPE="$2"
|
|
|
|
|
|
|
|
|
|
if [[ "$PROCESS_TYPE" != "web" ]]; then
|
|
|
|
|
return
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [[ "$(plugn trigger proxy-type "$APP")" != "nginx" ]]; then
|
|
|
|
|
return
|
|
|
|
|
fi
|
|
|
|
|
|
2023-01-21 16:44:35 -05:00
|
|
|
dokku_log_info2 "Triggering early nginx proxy rebuild"
|
2023-01-21 14:55:41 -05:00
|
|
|
plugn trigger proxy-build-config "$APP"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
trigger-nginx-vhosts-scheduler-post-deploy-process "$@"
|