Add docs for CHECKS

This commit is contained in:
Christian Joudrey
2014-12-24 01:30:31 -05:00
parent f5a5f7702b
commit 7bd5df0e25
2 changed files with 21 additions and 0 deletions

View File

@@ -4,6 +4,7 @@
Alexander <iam.asm89@gmail.com>
Alexander Beletsky <alexander.beletsky@gmail.com>
Alexis Gavoty <kload@kload.fr>
Christian Joudrey <cmallette@gmail.com>
Felipe Coury <felipe.coury@gmail.com>
Jeff Lindsay <progrium@gmail.com>
Jose Diaz-Gonzalez <dokku@josediazgonzalez.com>

View File

@@ -81,6 +81,26 @@ This is in particular useful, then you want to deploy to root domain, as
remote: -----> Application deployed:
remote: http://dokku.me
# Zero downtime deploy
Following a deploy Dokku's default behaviour is to switch new traffic over to the new container immediately.
This can be problematic for applications that take some time to boot up and can lead to `502 Bad Gateway` errors.
Dokku provides a way to run a set of checks against the new container, and only switch traffic over if all checks complete successfully.
To specify checks, add a `CHECKS` file to the root of your project directory. This is a text file with one line per check. Empty lines and lines starting with `#` are ignored.
A check is a relative URL and may be followed by expected content from the page, for example:
```
/about Our Amazing Team
```
Dokku will wait `DOKKU_CHECKS_WAIT` seconds (default: `5`) before running the checks to give server time to start. For shorter/longer wait, change the `DOKKU_CHECKS_WAIT` environment variable.
Dokku will wait `DOKKU_WAIT_TO_RETIRE` seconds (default: `60`) before stopping the old container such that no existing connections to it are dropped.
# Removing a deployed app
SSH onto the server, then execute: