Docs
Deploy

Deploy

How a push becomes a running app, and how to deploy by hand from your terminal.

A deploy builds the project's configured branch, runs the release command, starts the new version and moves traffic to it. A push to the branch does this for you, and cluz deploy does it on request.

What a push does

A push reads clusterz.yaml again, applies what changed in it, builds, and deploys. It does this when auto_deploy is on, the branch is the one the app builds, and, for GitLab and Bitbucket, the push hook is registered on the app's page.

Deploy by hand

cluz deploy --wait

--wait waits for the build and then its deployment, and exits non-zero with the platform's reason if either fails: the build's error and the last lines of its log, or the deployment's error (a failed health check, for example). -f also streams the build log.

A deploy builds the project's configured branch. To deploy another, change it with cluz projects update --branch <name>.

If the project declares required environment variables that are not set, the deploy is refused with the list of missing keys.

One app, many shapes

An app is one project: all of its services and its database, with its variables, domains and volumes. A monorepo with several services, microservices across repositories, and an API and a web app in separate repositories are each one app. Its address is made from its name, and it is yours to move to your own domain.

Next