1 parent
e9638a4d92
commit
86f917db79
3 files changed
+27
-3
No files matched your search
@@ -104,6 +104,7 @@ The following list config variables have special meaning and can be set in a var
|
|||||||
| `DOKKU_DEPLOY_BRANCH` | `master` | `dokku config:set` | Branch to deploy by default. |
|
| `DOKKU_DEPLOY_BRANCH` | `master` | `dokku config:set` | Branch to deploy by default. |
|
||||||
| `DOKKU_DISABLE_PROXY` | none | `dokku proxy:disable` <br /> `dokku proxy:enable` | Disables the proxy in front of your application, resulting in publicly routing the docker container. |
|
| `DOKKU_DISABLE_PROXY` | none | `dokku proxy:disable` <br /> `dokku proxy:enable` | Disables the proxy in front of your application, resulting in publicly routing the docker container. |
|
||||||
| `DOKKU_DISABLE_ANSI_PREFIX_REMOVAL` | none | `dokku config:set` <br /> `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | Disables removal of the ANSI prefix during deploys. Can be used in cases where the client deployer does not understand ansi escape codes. |
|
| `DOKKU_DISABLE_ANSI_PREFIX_REMOVAL` | none | `dokku config:set` <br /> `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | Disables removal of the ANSI prefix during deploys. Can be used in cases where the client deployer does not understand ansi escape codes. |
|
||||||
|
| `DOKKU_DISABLE_APP_AUTOCREATION` | none | `dokku config:set` | Disables automatic creation of a non-existent app on deploy. |
|
||||||
| `DOKKU_DOCKER_STOP_TIMEOUT` | `10` | `dokku config:set` | Configurable grace period given to the `docker stop` command. If a container has not stopped by this time, a `kill -9` signal or equivalent is sent in order to force-terminate the container. Both the `ps:stop` and `apps:destroy` commands _also_ respect this value. If not specified, the docker defaults for the [docker stop command](https://docs.docker.com/engine/reference/commandline/stop/) will be used.|
|
| `DOKKU_DOCKER_STOP_TIMEOUT` | `10` | `dokku config:set` | Configurable grace period given to the `docker stop` command. If a container has not stopped by this time, a `kill -9` signal or equivalent is sent in order to force-terminate the container. Both the `ps:stop` and `apps:destroy` commands _also_ respect this value. If not specified, the docker defaults for the [docker stop command](https://docs.docker.com/engine/reference/commandline/stop/) will be used.|
|
||||||
| `DOKKU_DOCKERFILE_CMD` | dockerfile cmd | `dokku config:set` | |
|
| `DOKKU_DOCKERFILE_CMD` | dockerfile cmd | `dokku config:set` | |
|
||||||
| `DOKKU_DOCKERFILE_CACHE_BUILD` | none | `dokku config:set` | |
|
| `DOKKU_DOCKERFILE_CACHE_BUILD` | none | `dokku config:set` | |
|
||||||
|
|||||||
+14
-3
@@ -23,8 +23,10 @@ use_git_worktree() {
|
|||||||
|
|
||||||
git_build_app_repo() {
|
git_build_app_repo() {
|
||||||
declare desc="builds local git app repo for app"
|
declare desc="builds local git app repo for app"
|
||||||
verify_app_name "$1"
|
declare APP="$1"; local REV="$2"
|
||||||
local APP="$1"; local REV="$2"
|
local DOKKU_GLOBAL_DISABLE_AUTOCREATE
|
||||||
|
|
||||||
|
verify_app_name "$APP"
|
||||||
|
|
||||||
# clean up after ourselves
|
# clean up after ourselves
|
||||||
local GIT_BUILD_APP_REPO_TMP_WORK_DIR=$(mktemp -d "/tmp/dokku_git.XXXX")
|
local GIT_BUILD_APP_REPO_TMP_WORK_DIR=$(mktemp -d "/tmp/dokku_git.XXXX")
|
||||||
@@ -33,7 +35,16 @@ git_build_app_repo() {
|
|||||||
local TMP_TAG="dokku/$REV"
|
local TMP_TAG="dokku/$REV"
|
||||||
chmod 755 "$GIT_BUILD_APP_REPO_TMP_WORK_DIR"
|
chmod 755 "$GIT_BUILD_APP_REPO_TMP_WORK_DIR"
|
||||||
unset GIT_DIR GIT_WORK_TREE
|
unset GIT_DIR GIT_WORK_TREE
|
||||||
[[ ! -d "$DOKKU_ROOT/$APP" ]] && apps_create "$APP"
|
|
||||||
|
DOKKU_GLOBAL_DISABLE_AUTOCREATE="$(config_get --global DOKKU_DISABLE_APP_AUTOCREATION)"
|
||||||
|
if [[ ! -d "$DOKKU_ROOT/$APP" ]]; then
|
||||||
|
if [[ "$DOKKU_GLOBAL_DISABLE_AUTOCREATE" == true ]]; then
|
||||||
|
dokku_log_warn "Invalid app name '$APP' specified."
|
||||||
|
dokku_log_fail "Check the name of the app or create an app with 'dokku apps:create ${APP}'"
|
||||||
|
else
|
||||||
|
apps_create "$APP"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if use_git_worktree; then
|
if use_git_worktree; then
|
||||||
# git worktree - this method uses git worktree which was introduced in git 2.5
|
# git worktree - this method uses git worktree which was introduced in git 2.5
|
||||||
|
|||||||
@@ -70,3 +70,15 @@ teardown() {
|
|||||||
echo "status: "$status
|
echo "status: "$status
|
||||||
assert_output "herokuish"
|
assert_output "herokuish"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@test "(build-env) app autocreate disabled" {
|
||||||
|
run dokku config:set --no-restart $TEST_APP DOKKU_DISABLE_APP_AUTOCREATION='true'
|
||||||
|
echo "output: "$output
|
||||||
|
echo "status: "$status
|
||||||
|
assert_success
|
||||||
|
|
||||||
|
run deploy_app
|
||||||
|
echo "output: "$output
|
||||||
|
echo "status: "$status
|
||||||
|
assert_failure
|
||||||
|
}
|
||||||
Reference in new issue
Block a user