This creates the following commands:
- apps
- apps:create <app>
- apps:destroy <app>
It also:
- makes `delete` an alias for `apps:destroy`
- adds confirmation to `apps:destroy`
- allows a developer to remove apps that have been created via apps:create but have not been deployed
Refs #87
Refs #543
Refs #586Closes#599
Refs #655
Refs #656
Refs #685Closes#757
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.