Files
dokku/plugins/nginx-vhosts/pre-enable-vhost
Jose Diaz-Gonzalez 1431724b85 feat: use ports-clear plugn trigger to manage clearing the port map
This removes any access to the underlying implementation for port map clearing, which will make it easier to refactor the actual clearing.
2023-08-05 10:58:57 -04:00

19 lines
576 B
Bash
Executable File

#!/usr/bin/env bash
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/config/functions"
trigger-nginx-vhosts-pre-enable-vhost() {
declare desc="unset port prior to vhosts being enabled"
declare trigger="pre-enable-vhost"
declare APP="$1"
if [[ "$(plugn trigger proxy-type "$APP")" == "nginx" ]]; then
DOKKU_QUIET_OUTPUT=1 config_unset --no-restart "$APP" DOKKU_PROXY_PORT DOKKU_PROXY_SSL_PORT
plugn trigger ports-clear "$APP"
fi
}
trigger-nginx-vhosts-pre-enable-vhost "$@"