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:
Jose Diaz-Gonzalez
2022-12-01 21:47:59 -05:00
parent 1fab98286b
commit 9eab17af11
6 changed files with 5 additions and 26 deletions

View File

@@ -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 "$@"