refactor: move domain manipulation into triggers

This allows other plugins to avoid understanding the underlying details of how domains might be integrated with.
This commit is contained in:
Jose Diaz-Gonzalez committed 2020-05-06 00:16:51 -04:00
1 parent 5458d5b341
commit 61a306664f
22 files changed
+226 -49

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
#!/usr/bin/env bash
source "$PLUGIN_AVAILABLE_PATH/domains/functions"
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
trigger-domains-domains-setup() {
declare desc="creates vhost files as necessary"
declare trigger="domains-setup"
declare APP="$1"
if [[ "$(is_app_vhost_enabled "$APP")" == "false" ]]; then
dokku_log_info1 "App virtual host support disabled, skipping domains setup"
return
fi
domains_setup "$APP"
}
trigger-domains-domains-setup "$@"