This change makes Dokku start up the new container, run a set of checks
against it, and only switch traffic over to the new containers if all
checks complete successfully. No requests are dropped during the switch
over.
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
Even if you don’t use any checks, this change will prevent downtime
during switching from old to new container.
See: https://labnotes.org/zero-downtime-deploy-with-dokku/
When an app directory (i.e. `/home/dokku/myapp`) is created before the
app is pushed for the first time (which may occur if config files such
as `ENV` are added before the initial push), then the app directory will
not be initialized to a bare git repo nor will the pre-receive hook be
installed because `plugins/git/commands` assumes that if `$APP_PATH`
exists, then the directory must also be git initialized too. This fix
checks for `$APP_PATH/refs` instead.
As discussed in #313, dokku base commands such as build, release, and
deploy require specifying both `$APP` and `$IMAGE` as arguments where
`IMAGE="app/$APP"`. Thus, the `$IMAGE` parameter is currently redudant.
This patch removes the need to specify `$IMAGE` for these base commands
and is backwards compatible. If, in the future, the base commands expect
and `$IMAGE` different than `app/$APP`, then the `$IMAGE` parameter will
be re-added for those specific commands.
Starting apps on daemon start has been handed by the upstart 'dokku-redeploy' script for a while. (Also, the format of /etc/init/docker.conf changed and rendered the sed useless.)
Fixes#322.
Buildpacks write into /cache as root, which made the delete command unable
to delete it.
Its contents are now deleted using "docker run", and thus as root.
If stdin is closed, which is the case when pluginhook is called from an
interactive session, "docker run" does not connect stdin and stderr by default.
Fixes#323