这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/application-deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,14 @@ Dokku only supports deploying from its master branch, so if you'd like to deploy

You can also support pushing multiple branches using the [receive-branch](/dokku/development/plugin-triggers/#receive-branch) plugin trigger in a custom plugin.

### Skipping deployment

If you only want to rebuild and tag a container, you can skip the deployment phase by setting `$DOKKU_SKIP_DEPLOY` to `true` by running:

``` shell
dokku config:set ruby-rails-sample DOKKU_SKIP_DEPLOY=true
```

### Deploying with private git submodules

Dokku uses git locally (i.e. not a docker image) to build its own copy of your app repo, including submodules. This is done as the `dokku` user. Therefore, in order to deploy private git submodules, you'll need to drop your deploy key in `/home/dokku/.ssh/` and potentially add github.com (or your VCS host key) into `/home/dokku/.ssh/known_hosts`. The following test should help confirm you've done it correctly.
Expand Down
19 changes: 15 additions & 4 deletions plugins/common/functions
Original file line number Diff line number Diff line change
Expand Up @@ -316,12 +316,23 @@ release_and_deploy() {
IMAGE_SOURCE_TYPE="dockerfile"
fi

DOKKU_APP_SKIP_DEPLOY="$(dokku config:get $APP DOKKU_SKIP_DEPLOY || true)"
DOKKU_GLOBAL_SKIP_DEPLOY="$(dokku config:get --global DOKKU_SKIP_DEPLOY || true)"

DOKKU_SKIP_DEPLOY=${DOKKU_APP_SKIP_DEPLOY:="$DOKKU_GLOBAL_SKIP_DEPLOY"}

dokku_log_info1 "Releasing $APP ($IMAGE)..."
dokku release "$APP" "$IMAGE_SOURCE_TYPE" "$IMAGE_TAG"
dokku_log_info1 "Deploying $APP ($IMAGE)..."
dokku deploy "$APP" "$IMAGE_TAG"
dokku_log_info2 "Application deployed:"
dokku urls $APP | sed "s/^/ /"

if [[ "$DOKKU_SKIP_DEPLOY" != "true" ]]; then
dokku_log_info1 "Deploying $APP ($IMAGE)..."
dokku deploy "$APP" "$IMAGE_TAG"
dokku_log_info2 "Application deployed:"
dokku urls $APP | sed "s/^/ /"
else
dokku_log_info1 "Skipping deployment"
fi

echo
fi
}
Expand Down