Remove domains:set-global command
This commit is contained in:
@@ -21,7 +21,7 @@ Applications typically have the following structure for their hostname:
|
||||
scheme://subdomain.domain.tld
|
||||
```
|
||||
|
||||
The `subdomain` is inferred from the pushed application name, while the `domain.tld` is set during initial configuration and stored in the `$DOKKU_ROOT/VHOST` file. It can then be modified with `dokku domains:set-global`. This value is used as a default TLD for all applications on a host.
|
||||
The `subdomain` is inferred from the pushed application name, while the `domain.tld` is set during initial configuration and stored in the `$DOKKU_ROOT/VHOST` file. It can then be modified with `dokku domains:add-global` and `dokku domains:remove-global`. This value is used as a default TLD for all applications on a host.
|
||||
|
||||
If a FQDN such as `other.tld` is used as the application name, the default `$DOKKU_ROOT/VHOST` will be ignored and the resulting vhost URL for that application will be `other.tld`. The exception to this rule being that if the FQDN has the same ending as the default vhost (such as `subdomain.domain.tld`), then the entire FQDN will be treated as a subdomain. The application will therefore be deployed at `subdomain.domain.tld.domain.tld`.
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@ case "$1" in
|
||||
domains:enable <app>, Enable VHOST support
|
||||
domains:remove <app> DOMAIN, Remove a domain from app
|
||||
domains:remove-global DOMAIN, Remove global domain name
|
||||
domains:set-global <domain>, Set global domain name
|
||||
help_content
|
||||
}
|
||||
|
||||
|
||||
@@ -163,15 +163,3 @@ domains_remove_global() {
|
||||
dokku_log_info1 "Removed $DOMAIN"
|
||||
done
|
||||
}
|
||||
|
||||
domains_set_global() {
|
||||
declare desc="set global domain name"
|
||||
local NEW_GLOBAL_VHOST="$1"; local GLOBAL_VHOST_PATH="$DOKKU_ROOT/VHOST"
|
||||
|
||||
if [[ -n "$NEW_GLOBAL_VHOST" ]]; then
|
||||
echo "$NEW_GLOBAL_VHOST" > "$GLOBAL_VHOST_PATH"
|
||||
dokku_log_info1 "Set global domain to $NEW_GLOBAL_VHOST"
|
||||
else
|
||||
dokku_log_fail "New global domain name must not be blank"
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/domains/functions"
|
||||
|
||||
domains_set_global_cmd() {
|
||||
declare desc="set global domain name from command line"
|
||||
local cmd="domains:set-global"
|
||||
[[ -z $2 ]] && dokku_log_fail "Please specify a global domain name"
|
||||
domains_set_global "$2"
|
||||
}
|
||||
|
||||
domains_set_global_cmd "$@"
|
||||
@@ -142,18 +142,6 @@ teardown() {
|
||||
refute_line "global.dokku.me"
|
||||
}
|
||||
|
||||
@test "(domains) domains:set-global" {
|
||||
run dokku domains:set-global global.dokku.me
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
|
||||
run bash -c "dokku domains | grep -q global.dokku.me"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test "(domains) domains (multiple global domains)" {
|
||||
run dokku domains:add-global global1.dokku.me global2.dokku.me
|
||||
echo "output: "$output
|
||||
|
||||
Reference in New Issue
Block a user