From b97086a8bd18a743bffd4509e3ee581c1a5f5ab9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Justen=20=28=40turicas=29?= Date: Sun, 5 Jan 2025 14:27:33 -0300 Subject: [PATCH] domains:clear now removes ALL app domains --- docs/configuration/domains.md | 6 +++--- docs/networking/proxy-management.md | 2 +- plugins/domains/functions | 3 +-- plugins/domains/help-functions | 2 +- plugins/domains/subcommands/clear | 2 +- plugins/domains/subcommands/clear-global | 4 ++-- 6 files changed, 9 insertions(+), 10 deletions(-) diff --git a/docs/configuration/domains.md b/docs/configuration/domains.md index 71ac8a98f..44a7627f8 100644 --- a/docs/configuration/domains.md +++ b/docs/configuration/domains.md @@ -6,8 +6,8 @@ ``` domains:add [ ...] # Add domains to app domains:add-global [ ...] # Add global domain names -domains:clear # Clear all domains for app -domains:clear-global # Clear global domain names +domains:clear # Remove all app domains +domains:clear-global # Remove all global domains domains:disable # Disable VHOST support domains:enable # Enable VHOST support domains:remove [ ...] # Remove domains from app @@ -67,7 +67,7 @@ dokku domains:add node-js-app dokku.me # list custom domains for app dokku domains:report node-js-app -# clear all custom domains for app +# delete all domains for app dokku domains:clear node-js-app # remove a custom domain from app diff --git a/docs/networking/proxy-management.md b/docs/networking/proxy-management.md index 6b1ec7f55..cce2b0835 100644 --- a/docs/networking/proxy-management.md +++ b/docs/networking/proxy-management.md @@ -150,7 +150,7 @@ At this time, the following dokku commands are used to interact with a complete - `domains:add`: Adds a given domain to an app. - triggers: `post-domains-update` -- `domains:clear`: Clears out an app's associated domains. +- `domains:clear`: Remove all app domains. - triggers: `post-domains-update` - `domains:disable`: Disables domains for an app. - triggers: `pre-disable-vhost` diff --git a/plugins/domains/functions b/plugins/domains/functions index 0798f48f3..41257e709 100755 --- a/plugins/domains/functions +++ b/plugins/domains/functions @@ -24,9 +24,8 @@ fn-domains-clear-app() { local APP_VHOST_PATH="$DOKKU_ROOT/$APP/VHOST" rm -f "$APP_VHOST_PATH" - domains_setup "$APP" plugn trigger post-domains-update "$APP" "clear" - dokku_log_info1 "Cleared domains in $APP" + dokku_log_info1 "Deleted all domains for $APP" } fn-domains-disable() { diff --git a/plugins/domains/help-functions b/plugins/domains/help-functions index 0f66a8734..72b8d9474 100755 --- a/plugins/domains/help-functions +++ b/plugins/domains/help-functions @@ -29,7 +29,7 @@ fn-help-content() { cat < [ ...], Add domains to app domains:add-global [ ...], Add global domain names - domains:clear , Clear all domains for app + domains:clear , Remove all app domains domains:clear-global, Clear global domain names domains:disable , Disable VHOST support domains:enable , Enable VHOST support diff --git a/plugins/domains/subcommands/clear b/plugins/domains/subcommands/clear index c6065abb2..3b18beaa0 100755 --- a/plugins/domains/subcommands/clear +++ b/plugins/domains/subcommands/clear @@ -5,7 +5,7 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" source "$PLUGIN_AVAILABLE_PATH/domains/functions" cmd-domains-clear() { - declare desc="clear all app domains" + declare desc="remove all app domains" declare cmd="domains:clear" [[ "$1" == "$cmd" ]] && shift 1 declare APP="$1" diff --git a/plugins/domains/subcommands/clear-global b/plugins/domains/subcommands/clear-global index ff7ae757b..3fd4815b5 100755 --- a/plugins/domains/subcommands/clear-global +++ b/plugins/domains/subcommands/clear-global @@ -5,11 +5,11 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" source "$PLUGIN_AVAILABLE_PATH/domains/functions" cmd-domains-clear-global() { - declare desc="clear global domain names via command line" + declare desc="remove all global domains" declare cmd="domains:clear-global" [[ "$1" == "$cmd" ]] && shift 1 - dokku_log_info1_quiet "Clearing global domains" + dokku_log_info1_quiet "Deleting global domains" domains_clear_global "$@" }