refactor: setup app domains in the post-create hook
This is more consistent with app setup, at the cost of making it so developers must disable domains manually afterwards.
This commit is contained in:
@@ -30,9 +30,6 @@ trigger-caddy-vhosts-docker-args-process-deploy() {
|
||||
return
|
||||
fi
|
||||
|
||||
# run this silently or the output will be set as a label
|
||||
plugn trigger domains-setup "$APP" >/dev/null
|
||||
|
||||
# ensure we have a port mapping
|
||||
plugn trigger proxy-configure-ports "$APP"
|
||||
|
||||
|
||||
@@ -3,17 +3,17 @@ source "$PLUGIN_AVAILABLE_PATH/domains/functions"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
trigger-domains-domains-setup() {
|
||||
trigger-domains-post-create() {
|
||||
declare desc="creates vhost files as necessary"
|
||||
declare trigger="domains-setup"
|
||||
declare trigger="post-create"
|
||||
declare APP="$1"
|
||||
|
||||
if [[ "$(is_app_vhost_enabled "$APP")" == "false" ]]; then
|
||||
dokku_log_info1 "App virtual host support disabled, skipping domains setup"
|
||||
dokku_log_info1 "App virtual host support disabled, skipping domain setup"
|
||||
return
|
||||
fi
|
||||
|
||||
domains_setup "$APP"
|
||||
}
|
||||
|
||||
trigger-domains-domains-setup "$@"
|
||||
trigger-domains-post-create "$@"
|
||||
@@ -16,7 +16,6 @@ trigger-nginx-vhosts-proxy-build-config() {
|
||||
|
||||
HAS_NETWORK_CONFIG="$(plugn trigger network-config-exists "$APP")"
|
||||
if [[ "$HAS_NETWORK_CONFIG" == "true" ]]; then
|
||||
plugn trigger domains-setup "$APP"
|
||||
plugn trigger network-build-config "$APP"
|
||||
nginx_build_config "$APP"
|
||||
if [[ -f "${DOKKU_LIB_ROOT}/data/nginx-vhosts/app-$APP/nginx.conf.sigil.$DOKKU_PID" ]]; then
|
||||
|
||||
@@ -30,9 +30,6 @@ trigger-traefik-vhosts-docker-args-process-deploy() {
|
||||
return
|
||||
fi
|
||||
|
||||
# run this silently or the output will be set as a label
|
||||
plugn trigger domains-setup "$APP" >/dev/null
|
||||
|
||||
# ensure we have a port mapping
|
||||
plugn trigger proxy-configure-ports "$APP"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user