domains:clear now removes ALL app domains

This commit is contained in:
Álvaro Justen (@turicas)
2025-01-05 14:27:33 -03:00
committed by Jose Diaz-Gonzalez
parent 7b45131486
commit b97086a8bd
6 changed files with 9 additions and 10 deletions

View File

@@ -6,8 +6,8 @@
```
domains:add <app> <domain> [<domain> ...] # Add domains to app
domains:add-global <domain> [<domain> ...] # Add global domain names
domains:clear <app> # Clear all domains for app
domains:clear-global # Clear global domain names
domains:clear <app> # Remove all app domains
domains:clear-global # Remove all global domains
domains:disable <app> # Disable VHOST support
domains:enable <app> # Enable VHOST support
domains:remove <app> <domain> [<domain> ...] # 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

View File

@@ -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`

View File

@@ -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() {

View File

@@ -29,7 +29,7 @@ fn-help-content() {
cat <<help_content
domains:add <app> <domain> [<domain> ...], Add domains to app
domains:add-global <domain> [<domain> ...], Add global domain names
domains:clear <app>, Clear all domains for app
domains:clear <app>, Remove all app domains
domains:clear-global, Clear global domain names
domains:disable <app>, Disable VHOST support
domains:enable <app>, Enable VHOST support

View File

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

View File

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