Merge pull request #5659 from dokku/remove-deprecated-functions
Remove deprecated functions and commands
This commit is contained in:
@@ -10,3 +10,22 @@
|
||||
- `post-release-dockerfile`
|
||||
- `post-release-pack`
|
||||
- The ability to call `logs:failed` without specifying an app or `--all` flag has been removed. This was deprecated in 0.22.0. Please see the [logs:failed](/docs/deployment/logs.md#failed-deploy-logs).
|
||||
- The following app shell functions - deprecated since 0.20.0 - have been removed in favor of their plugin trigger equivalents. Sourcing the `app/functions` file will fail going forward.
|
||||
- `apps#apps_create()` is removed in favor of `plugn trigger app-create`.
|
||||
- `apps#apps_destroy()` is removed in favor of `plugn trigger app-destroy`.
|
||||
- `apps#apps_exists()` is removed in favor of `plugn trigger app-exists`.
|
||||
- `apps#apps_maybe_create()` is removed in favor of `plugn trigger app-maybe-create`.
|
||||
- The following common shell functions have been removed:
|
||||
- `common#is_container_running()` (deprecated since 0.12.6) is removed in favor of `common#is_container_status()`.
|
||||
- `common#is_app_running()` (deprecated since 0.22.0) is removed in favor of `ps#fn-ps-is-app-running()`.
|
||||
- The global `--rm-container` and `--rm` flags - deprecated since 0.25.0 - have been removed.
|
||||
- The following git shell functions have been removed:
|
||||
- `git#use_git_worktree()` (deprecated since 0.23.7) has been removed. There is no alternative as the function has been made internal.
|
||||
- `git#git_deploy_branch()`(deprecated since 0.21.0) has been removed in favor of `plugn trigger git-deploy-branch`.
|
||||
- The following nginx commands - deprecated since 0.20.0 - have been removed:
|
||||
- `nginx:show-conf` has been removed in favor of `nginx:show-config`.
|
||||
- `nginx:validate` has been removed in favor of `nginx:validate-config`.
|
||||
- `nginx:build-config` - deprecated since 0.21.0 - has been removed in favor of `proxy:build-config`.
|
||||
- The following proxy functions - deprecated since 0.20.0 - have been removed in favor of their plugin trigger equivalents. Sourcing the `proxy/functions` file will fail going forward.
|
||||
- `proxy#is_app_proxy_enabled()` is removed in favor of `plugn trigger proxy-is-enabled`.
|
||||
- `proxy#get_app_proxy_type()` is removed in favor of `plugn trigger proxy-type`.
|
||||
|
||||
@@ -1196,7 +1196,7 @@ echo "$NEW_SUBDOMAIN.$VHOST"
|
||||
> Warning: The arguments INTERNAL_PORT and INTERNAL_IP_ADDRESS are no longer sufficient to retrieve all app listeners. Please run `plugn trigger network-get-listeners APP` within any implementation of `nginx-pre-reload` in order to retrieve all application listeners.
|
||||
|
||||
- Description: Run before nginx reloads hosts
|
||||
- Invoked by: `dokku nginx:build-config`
|
||||
- Invoked by: `dokku proxy:build-config`
|
||||
- Arguments: `$APP $INTERNAL_PORT $INTERNAL_IP_ADDRESS`
|
||||
- Example:
|
||||
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
|
||||
apps_create() {
|
||||
declare desc="verifies app name and creates an app"
|
||||
declare APP="$1"
|
||||
declare deprecated=true
|
||||
|
||||
dokku_log_warn "Deprecated: plugn#app-create"
|
||||
plugn trigger app-create "$APP"
|
||||
}
|
||||
|
||||
apps_destroy() {
|
||||
declare desc="destroys an app"
|
||||
declare APP="$1"
|
||||
declare deprecated=true
|
||||
|
||||
dokku_log_warn "Deprecated: plugn#app-destroy"
|
||||
plugn trigger app-destroy "$APP"
|
||||
}
|
||||
|
||||
apps_exists() {
|
||||
declare desc="checks if an app exists"
|
||||
declare APP="$1"
|
||||
declare deprecated=true
|
||||
|
||||
dokku_log_warn "Deprecated: plugn#app-exists"
|
||||
plugn trigger app-exists "$APP"
|
||||
}
|
||||
|
||||
apps_maybe_create() {
|
||||
declare desc="creates an app dir if allowed"
|
||||
declare APP="$1"
|
||||
declare deprecated=true
|
||||
|
||||
dokku_log_warn "Deprecated: plugn#app-maybe-create"
|
||||
plugn trigger app-maybe-create "$APP"
|
||||
}
|
||||
@@ -430,9 +430,6 @@ parse_args() {
|
||||
--trace)
|
||||
export DOKKU_TRACE=1
|
||||
;;
|
||||
--rm-container | --rm)
|
||||
dokku_log_warn_quiet "Deprecated: all run containers are now removed on exit by default"
|
||||
;;
|
||||
--force)
|
||||
export DOKKU_APPS_FORCE_DELETE=1
|
||||
;;
|
||||
@@ -573,22 +570,6 @@ is_deployed() {
|
||||
"$PLUGIN_CORE_AVAILABLE_PATH/common/common" --quiet is-deployed "$APP"
|
||||
}
|
||||
|
||||
is_container_running() {
|
||||
declare desc="return 0 if given docker container id is in running state"
|
||||
declare deprecated=true
|
||||
declare CID="$1"
|
||||
local CONTAINER_STATUS
|
||||
|
||||
dokku_log_warn "Deprecated: common#is_container_status"
|
||||
CONTAINER_STATUS=$("$DOCKER_BIN" container inspect --format '{{.State.Running}}' "$CID" || true)
|
||||
|
||||
if [[ "$CONTAINER_STATUS" == "true" ]]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
is_container_status() {
|
||||
declare desc="return 0 if given docker container id is in given state"
|
||||
local CID=$1
|
||||
@@ -602,22 +583,6 @@ is_container_status() {
|
||||
return 1
|
||||
}
|
||||
|
||||
is_app_running() {
|
||||
declare desc="return 0 if given app has a running container"
|
||||
declare deprecated=true
|
||||
local APP="$1"
|
||||
|
||||
dokku_log_warn "Deprecated: ps#fn-ps-is-app-running"
|
||||
|
||||
local APP_RUNNING_CONTAINER_IDS=$(get_app_running_container_ids "$APP" 2>/dev/null)
|
||||
|
||||
if [[ -n "$APP_RUNNING_CONTAINER_IDS" ]]; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
dokku_build() {
|
||||
declare desc="build phase"
|
||||
declare APP="$1" IMAGE_SOURCE_TYPE="$2" SOURCECODE_WORK_DIR="$3"
|
||||
|
||||
@@ -1,20 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/apps/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/git/internal-functions"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
use_git_worktree() {
|
||||
declare desc="detects whether to use git worktree"
|
||||
declare deprecated=true
|
||||
dokku_log_warn "Deprecated: fn-git-use-worktree"
|
||||
|
||||
fn-git-use-worktree
|
||||
}
|
||||
|
||||
git_build_app_repo() {
|
||||
declare desc="builds local git app repo for app"
|
||||
declare APP="$1" REV="$2"
|
||||
@@ -78,15 +69,6 @@ git_trigger_build() {
|
||||
dokku_receive "$APP" "$BUILDER" "$TMP_WORK_DIR"
|
||||
}
|
||||
|
||||
git_deploy_branch() {
|
||||
declare desc="retrieve the deploy branch for a given application"
|
||||
declare APP="$1"
|
||||
declare deprecated=true
|
||||
dokku_log_warn "Deprecated: plugn#git-deploy-branch"
|
||||
|
||||
fn-git-deploy-branch "$APP"
|
||||
}
|
||||
|
||||
cmd-git-hook() {
|
||||
declare desc="kick off receive-app trigger from git prereceive hook"
|
||||
declare cmd="git-hook"
|
||||
|
||||
@@ -94,12 +94,7 @@ cmd-nginx-report-single() {
|
||||
cmd-nginx-show-config() {
|
||||
declare desc="display app nginx config"
|
||||
declare cmd="nginx:show-config"
|
||||
declare deprecated=true
|
||||
[[ "$1" == "$cmd" ]] && shift 1
|
||||
if [[ "$1" == "nginx:show-conf" ]]; then
|
||||
dokku_log_warn "Deprecated: Please use nginx:show-config"
|
||||
shift 1
|
||||
fi
|
||||
declare APP="$1"
|
||||
|
||||
verify_app_name "$APP"
|
||||
@@ -133,12 +128,7 @@ cmd-nginx-stop() {
|
||||
cmd-nginx-validate-config() {
|
||||
declare desc="validates and optionally cleans up invalid nginx configurations"
|
||||
declare cmd="nginx:validate-config"
|
||||
declare deprecated=true
|
||||
[[ "$1" == "$cmd" ]] && shift 1
|
||||
if [[ "$1" == "nginx:validate" ]]; then
|
||||
dokku_log_warn "Deprecated: Please use nginx:validate-config"
|
||||
shift 1
|
||||
fi
|
||||
declare APP="$1" FLAG="$2"
|
||||
|
||||
validate_nginx "$APP" "$FLAG"
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
cmd-nginx-build-config() {
|
||||
declare desc="build nginx config to proxy app containers from command line"
|
||||
declare cmd="nginx:build-config"
|
||||
[[ "$1" == "$cmd" ]] && shift 1
|
||||
declare APP="$1"
|
||||
verify_app_name "$APP"
|
||||
dokku_log_warn "Deprecated: Please use proxy:build-config"
|
||||
|
||||
local PROXY_APP_TYPE
|
||||
PROXY_APP_TYPE="$(plugn trigger proxy-type "$APP")"
|
||||
|
||||
if [[ "$PROXY_APP_TYPE" == "nginx" ]]; then
|
||||
plugn trigger proxy-build-config "$APP"
|
||||
else
|
||||
dokku_log_fail "Configured proxy for ${APP} is ${PROXY_APP_TYPE}"
|
||||
fi
|
||||
}
|
||||
|
||||
cmd-nginx-build-config "$@"
|
||||
@@ -1,23 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
|
||||
is_app_proxy_enabled() {
|
||||
declare desc="return true if proxy is enabled; otherwise return false"
|
||||
declare APP="$1"
|
||||
declare deprecated=true
|
||||
dokku_log_warn "Deprecated: Use plugn#proxy-is-enabled"
|
||||
|
||||
plugn trigger proxy-is-enabled "$APP"
|
||||
}
|
||||
|
||||
get_app_proxy_type() {
|
||||
declare desc="return app proxy type"
|
||||
declare APP="$1"
|
||||
declare deprecated=true
|
||||
dokku_log_warn "Deprecated: Use plugn#proxy-type"
|
||||
|
||||
plugn trigger proxy-type "$APP"
|
||||
}
|
||||
@@ -28,7 +28,7 @@ teardown() {
|
||||
assert_output "$help_output"
|
||||
}
|
||||
|
||||
@test "(nginx-vhosts) nginx:build-config (domains:disable/enable)" {
|
||||
@test "(nginx-vhosts) proxy:build-config (domains:disable/enable)" {
|
||||
deploy_app
|
||||
dokku domains:disable $TEST_APP
|
||||
|
||||
@@ -45,7 +45,7 @@ teardown() {
|
||||
assert_http_success http://${TEST_APP}.dokku.me
|
||||
}
|
||||
|
||||
@test "(nginx-vhosts) nginx:build-config (domains:add pre deploy)" {
|
||||
@test "(nginx-vhosts) proxy:build-config (domains:add pre deploy)" {
|
||||
create_app
|
||||
run /bin/bash -c "dokku domains:add $TEST_APP www.test.app.dokku.me"
|
||||
echo "output: $output"
|
||||
@@ -59,7 +59,7 @@ teardown() {
|
||||
assert_http_success http://www.test.app.dokku.me
|
||||
}
|
||||
|
||||
@test "(nginx-vhosts) nginx:build-config (with global VHOST)" {
|
||||
@test "(nginx-vhosts) proxy:build-config (with global VHOST)" {
|
||||
echo "dokku.me" >"$DOKKU_ROOT/VHOST"
|
||||
deploy_app
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ teardown() {
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku nginx:build-config $TEST_APP"
|
||||
run /bin/bash -c "dokku proxy:build-config $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
@@ -35,7 +35,7 @@ teardown() {
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku nginx:build-config $TEST_APP"
|
||||
run /bin/bash -c "dokku proxy:build-config $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
@@ -52,7 +52,7 @@ teardown() {
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku nginx:build-config $TEST_APP"
|
||||
run /bin/bash -c "dokku proxy:build-config $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
@@ -67,7 +67,7 @@ teardown() {
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku nginx:build-config $TEST_APP"
|
||||
run /bin/bash -c "dokku proxy:build-config $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
@@ -84,7 +84,7 @@ teardown() {
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku nginx:build-config $TEST_APP"
|
||||
run /bin/bash -c "dokku proxy:build-config $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
@@ -99,7 +99,7 @@ teardown() {
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku nginx:build-config $TEST_APP"
|
||||
run /bin/bash -c "dokku proxy:build-config $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
@@ -116,7 +116,7 @@ teardown() {
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku nginx:build-config $TEST_APP"
|
||||
run /bin/bash -c "dokku proxy:build-config $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
@@ -131,7 +131,7 @@ teardown() {
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku nginx:build-config $TEST_APP"
|
||||
run /bin/bash -c "dokku proxy:build-config $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
@@ -146,7 +146,7 @@ teardown() {
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku nginx:build-config $TEST_APP"
|
||||
run /bin/bash -c "dokku proxy:build-config $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
@@ -161,7 +161,7 @@ teardown() {
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku nginx:build-config $TEST_APP"
|
||||
run /bin/bash -c "dokku proxy:build-config $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
@@ -22,7 +22,7 @@ teardown() {
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku nginx:build-config $TEST_APP"
|
||||
run /bin/bash -c "dokku proxy:build-config $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
@@ -37,7 +37,7 @@ teardown() {
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku nginx:build-config $TEST_APP"
|
||||
run /bin/bash -c "dokku proxy:build-config $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
@@ -56,7 +56,7 @@ teardown() {
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku nginx:build-config $TEST_APP"
|
||||
run /bin/bash -c "dokku proxy:build-config $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
@@ -71,7 +71,7 @@ teardown() {
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku nginx:build-config $TEST_APP"
|
||||
run /bin/bash -c "dokku proxy:build-config $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
@@ -90,7 +90,7 @@ teardown() {
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku nginx:build-config $TEST_APP"
|
||||
run /bin/bash -c "dokku proxy:build-config $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
@@ -105,7 +105,7 @@ teardown() {
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku nginx:build-config $TEST_APP"
|
||||
run /bin/bash -c "dokku proxy:build-config $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
@@ -124,7 +124,7 @@ teardown() {
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku nginx:build-config $TEST_APP"
|
||||
run /bin/bash -c "dokku proxy:build-config $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
@@ -139,7 +139,7 @@ teardown() {
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku nginx:build-config $TEST_APP"
|
||||
run /bin/bash -c "dokku proxy:build-config $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
@@ -14,7 +14,7 @@ teardown() {
|
||||
global_teardown
|
||||
}
|
||||
|
||||
@test "(nginx-vhosts) nginx:build-config (with SSL and unrelated domain)" {
|
||||
@test "(nginx-vhosts) proxy:build-config (with SSL and unrelated domain)" {
|
||||
setup_test_tls
|
||||
dokku domains:add $TEST_APP "node-js-app.dokku.me"
|
||||
dokku domains:add $TEST_APP "test.dokku.me"
|
||||
@@ -24,7 +24,7 @@ teardown() {
|
||||
assert_http_redirect "http://test.dokku.me" "https://test.dokku.me:443/"
|
||||
}
|
||||
|
||||
@test "(nginx-vhosts) nginx:build-config (wildcard SSL)" {
|
||||
@test "(nginx-vhosts) proxy:build-config (wildcard SSL)" {
|
||||
setup_test_tls wildcard
|
||||
dokku domains:add $TEST_APP "wildcard1.dokku.me"
|
||||
dokku domains:add $TEST_APP "wildcard2.dokku.me"
|
||||
@@ -34,7 +34,7 @@ teardown() {
|
||||
assert_ssl_domain "wildcard2.dokku.me"
|
||||
}
|
||||
|
||||
@test "(nginx-vhosts) nginx:build-config (wildcard SSL and unrelated domain) 1" {
|
||||
@test "(nginx-vhosts) proxy:build-config (wildcard SSL and unrelated domain) 1" {
|
||||
destroy_app
|
||||
TEST_APP="${TEST_APP}.example.com"
|
||||
run /bin/bash -c "dokku apps:create $TEST_APP"
|
||||
@@ -49,7 +49,7 @@ teardown() {
|
||||
assert_output "0"
|
||||
}
|
||||
|
||||
@test "(nginx-vhosts) nginx:build-config (with SSL and Multiple SANs)" {
|
||||
@test "(nginx-vhosts) proxy:build-config (with SSL and Multiple SANs)" {
|
||||
setup_test_tls sans
|
||||
dokku domains:add $TEST_APP "test.dokku.me"
|
||||
dokku domains:add $TEST_APP "www.test.dokku.me"
|
||||
|
||||
@@ -14,7 +14,7 @@ teardown() {
|
||||
global_teardown
|
||||
}
|
||||
|
||||
@test "(nginx-vhosts) nginx:build-config (without global VHOST)" {
|
||||
@test "(nginx-vhosts) proxy:build-config (without global VHOST)" {
|
||||
rm "$DOKKU_ROOT/VHOST"
|
||||
deploy_app
|
||||
|
||||
@@ -32,7 +32,7 @@ teardown() {
|
||||
done
|
||||
}
|
||||
|
||||
@test "(nginx-vhosts) nginx:build-config (without global VHOST and IPv4 address set as HOSTNAME)" {
|
||||
@test "(nginx-vhosts) proxy:build-config (without global VHOST and IPv4 address set as HOSTNAME)" {
|
||||
rm "$DOKKU_ROOT/VHOST"
|
||||
echo "127.0.0.1" >"$DOKKU_ROOT/VHOST"
|
||||
deploy_app
|
||||
@@ -46,7 +46,7 @@ teardown() {
|
||||
done
|
||||
}
|
||||
|
||||
@test "(nginx-vhosts) nginx:build-config (without global VHOST and IPv6 address set as HOSTNAME)" {
|
||||
@test "(nginx-vhosts) proxy:build-config (without global VHOST and IPv6 address set as HOSTNAME)" {
|
||||
rm "$DOKKU_ROOT/VHOST"
|
||||
echo "fda5:c7db:a520:bb6d::aabb:ccdd:eeff" >"$DOKKU_ROOT/VHOST"
|
||||
deploy_app
|
||||
@@ -55,7 +55,7 @@ teardown() {
|
||||
check_urls http://${HOSTNAME}:[0-9]+
|
||||
}
|
||||
|
||||
@test "(nginx-vhosts) nginx:build-config (without global VHOST and domains:add pre deploy)" {
|
||||
@test "(nginx-vhosts) proxy:build-config (without global VHOST and domains:add pre deploy)" {
|
||||
rm "$DOKKU_ROOT/VHOST"
|
||||
create_app
|
||||
dokku domains:add $TEST_APP "www.test.app.dokku.me"
|
||||
@@ -63,7 +63,7 @@ teardown() {
|
||||
assert_nonssl_domain "www.test.app.dokku.me"
|
||||
}
|
||||
|
||||
@test "(nginx-vhosts) nginx:build-config (without global VHOST and domains:add post deploy)" {
|
||||
@test "(nginx-vhosts) proxy:build-config (without global VHOST and domains:add post deploy)" {
|
||||
rm "$DOKKU_ROOT/VHOST"
|
||||
deploy_app
|
||||
dokku domains:add $TEST_APP "www.test.app.dokku.me"
|
||||
|
||||
@@ -15,7 +15,7 @@ teardown() {
|
||||
global_teardown
|
||||
}
|
||||
|
||||
@test "(nginx-vhosts) nginx:build-config (sslip.io style hostnames)" {
|
||||
@test "(nginx-vhosts) proxy:build-config (sslip.io style hostnames)" {
|
||||
echo "127.0.0.1.sslip.io.dokku.me" >"$DOKKU_ROOT/VHOST"
|
||||
deploy_app
|
||||
|
||||
@@ -23,7 +23,7 @@ teardown() {
|
||||
assert_http_success http://${TEST_APP}.127.0.0.1.sslip.io.dokku.me
|
||||
}
|
||||
|
||||
@test "(nginx-vhosts) nginx:build-config (dockerfile expose)" {
|
||||
@test "(nginx-vhosts) proxy:build-config (dockerfile expose)" {
|
||||
deploy_app dockerfile
|
||||
|
||||
dokku domains:add $TEST_APP "www.test.app.dokku.me"
|
||||
@@ -38,17 +38,17 @@ teardown() {
|
||||
|
||||
}
|
||||
|
||||
@test "(nginx-vhosts) nginx:build-config (multiple networks)" {
|
||||
@test "(nginx-vhosts) proxy:build-config (multiple networks)" {
|
||||
deploy_app
|
||||
|
||||
create_attach_network
|
||||
run /bin/bash -c "dokku nginx:build-config $TEST_APP"
|
||||
run /bin/bash -c "dokku proxy:build-config $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test "(nginx-vhosts) nginx:build-config (global DOKKU_PROXY_PORT)" {
|
||||
@test "(nginx-vhosts) proxy:build-config (global DOKKU_PROXY_PORT)" {
|
||||
local GLOBAL_PORT=30999
|
||||
run /bin/bash -c "dokku config:set --global DOKKU_PROXY_PORT=${GLOBAL_PORT}"
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ teardown() {
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
run /bin/bash -c "dokku nginx:build-config $TEST_APP"
|
||||
run /bin/bash -c "dokku proxy:build-config $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
@@ -66,7 +66,7 @@ teardown() {
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
run /bin/bash -c "dokku nginx:build-config $TEST_APP"
|
||||
run /bin/bash -c "dokku proxy:build-config $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
@@ -79,7 +79,7 @@ teardown() {
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
run /bin/bash -c "dokku nginx:build-config $TEST_APP"
|
||||
run /bin/bash -c "dokku proxy:build-config $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
@@ -93,7 +93,7 @@ teardown() {
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku nginx:build-config $TEST_APP"
|
||||
run /bin/bash -c "dokku proxy:build-config $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
@@ -171,7 +171,7 @@ teardown() {
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku nginx:build-config $TEST_APP"
|
||||
run /bin/bash -c "dokku proxy:build-config $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
@@ -192,7 +192,7 @@ teardown() {
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku nginx:build-config $TEST_APP"
|
||||
run /bin/bash -c "dokku proxy:build-config $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
@@ -14,7 +14,7 @@ teardown() {
|
||||
global_teardown
|
||||
}
|
||||
|
||||
@test "(nginx-vhosts) nginx:build-config (wildcard SSL and custom nginx template)" {
|
||||
@test "(nginx-vhosts) proxy:build-config (wildcard SSL and custom nginx template)" {
|
||||
setup_test_tls wildcard
|
||||
dokku domains:add $TEST_APP "wildcard1.dokku.me"
|
||||
dokku domains:add $TEST_APP "wildcard2.dokku.me"
|
||||
@@ -26,7 +26,7 @@ teardown() {
|
||||
assert_http_success "https://${CUSTOM_TEMPLATE_SSL_DOMAIN}"
|
||||
}
|
||||
|
||||
@test "(nginx-vhosts) nginx:build-config (custom nginx template - no ssl)" {
|
||||
@test "(nginx-vhosts) proxy:build-config (custom nginx template - no ssl)" {
|
||||
dokku domains:add $TEST_APP "www.test.app.dokku.me"
|
||||
run deploy_app nodejs-express dokku@dokku.me:$TEST_APP custom_nginx_template
|
||||
echo "output: $output"
|
||||
@@ -47,7 +47,7 @@ teardown() {
|
||||
assert_output_contains "${TEST_APP}-worker-5000"
|
||||
}
|
||||
|
||||
@test "(nginx-vhosts) nginx:build-config (disable custom nginx template - no ssl)" {
|
||||
@test "(nginx-vhosts) proxy:build-config (disable custom nginx template - no ssl)" {
|
||||
run /bin/bash -c "dokku nginx:set $TEST_APP disable-custom-config true"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
@@ -72,7 +72,7 @@ teardown() {
|
||||
assert_output_contains "${TEST_APP}-worker-5000" 0
|
||||
}
|
||||
|
||||
@test "(nginx-vhosts) nginx:build-config (failed validate_nginx)" {
|
||||
@test "(nginx-vhosts) proxy:build-config (failed validate_nginx)" {
|
||||
run deploy_app nodejs-express dokku@dokku.me:$TEST_APP bad_custom_nginx_template
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
|
||||
@@ -22,7 +22,7 @@ teardown() {
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku nginx:build-config $TEST_APP"
|
||||
run /bin/bash -c "dokku proxy:build-config $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
@@ -37,7 +37,7 @@ teardown() {
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku nginx:build-config $TEST_APP"
|
||||
run /bin/bash -c "dokku proxy:build-config $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
@@ -56,7 +56,7 @@ teardown() {
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku nginx:build-config $TEST_APP"
|
||||
run /bin/bash -c "dokku proxy:build-config $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
@@ -71,7 +71,7 @@ teardown() {
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku nginx:build-config $TEST_APP"
|
||||
run /bin/bash -c "dokku proxy:build-config $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
@@ -91,7 +91,7 @@ teardown() {
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku nginx:build-config $TEST_APP"
|
||||
run /bin/bash -c "dokku proxy:build-config $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
@@ -106,7 +106,7 @@ teardown() {
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku nginx:build-config $TEST_APP"
|
||||
run /bin/bash -c "dokku proxy:build-config $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
@@ -117,7 +117,7 @@ teardown() {
|
||||
assert_output_contains "45s;" 0
|
||||
}
|
||||
|
||||
@test "(nginx-vhosts) nginx:build-config ignore bad https mapping" {
|
||||
@test "(nginx-vhosts) proxy:build-config ignore bad https mapping" {
|
||||
setup_test_tls
|
||||
run deploy_app "dockerfile-noexpose"
|
||||
echo "output: $output"
|
||||
@@ -130,7 +130,7 @@ teardown() {
|
||||
echo "status: $status"
|
||||
assert_output "http:80:5000 https:443:5000"
|
||||
|
||||
run /bin/bash -c "dokku nginx:build-config $TEST_APP"
|
||||
run /bin/bash -c "dokku proxy:build-config $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_output_contains "Ignoring detected https port mapping without an accompanying ssl certificate" 1
|
||||
|
||||
@@ -46,7 +46,7 @@ teardown() {
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku nginx:build-config $TEST_APP"
|
||||
run /bin/bash -c "dokku proxy:build-config $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
@@ -61,7 +61,7 @@ teardown() {
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku nginx:build-config $TEST_APP"
|
||||
run /bin/bash -c "dokku proxy:build-config $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
@@ -76,7 +76,7 @@ teardown() {
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku nginx:build-config $TEST_APP"
|
||||
run /bin/bash -c "dokku proxy:build-config $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
@@ -91,7 +91,7 @@ teardown() {
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku nginx:build-config $TEST_APP"
|
||||
run /bin/bash -c "dokku proxy:build-config $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
@@ -110,7 +110,7 @@ teardown() {
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku nginx:build-config $TEST_APP"
|
||||
run /bin/bash -c "dokku proxy:build-config $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
@@ -125,7 +125,7 @@ teardown() {
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku nginx:build-config $TEST_APP"
|
||||
run /bin/bash -c "dokku proxy:build-config $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
@@ -141,7 +141,7 @@ teardown() {
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku nginx:build-config $TEST_APP"
|
||||
run /bin/bash -c "dokku proxy:build-config $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
@@ -152,7 +152,7 @@ teardown() {
|
||||
assert_output_contains "-access.log;"
|
||||
}
|
||||
|
||||
@test "(nginx-vhosts) nginx:build-config (with SSL and unrelated domain)" {
|
||||
@test "(nginx-vhosts) proxy:build-config (with SSL and unrelated domain)" {
|
||||
setup_test_tls
|
||||
dokku domains:add $TEST_APP "node-js-app.dokku.me"
|
||||
dokku domains:add $TEST_APP "test.dokku.me"
|
||||
@@ -162,7 +162,7 @@ teardown() {
|
||||
assert_http_redirect "http://test.dokku.me" "https://test.dokku.me:443/"
|
||||
}
|
||||
|
||||
@test "(nginx-vhosts) nginx:build-config (wildcard SSL)" {
|
||||
@test "(nginx-vhosts) proxy:build-config (wildcard SSL)" {
|
||||
setup_test_tls wildcard
|
||||
dokku domains:add $TEST_APP "wildcard1.dokku.me"
|
||||
dokku domains:add $TEST_APP "wildcard2.dokku.me"
|
||||
|
||||
Reference in New Issue
Block a user