Deploys, updates, and rollback

A deployment creates a new version without replacing the working version until the new one is ready. The pipeline makes each stage visible, blocks known configuration problems, and keeps successful versions available for rollback.

Last updated

AI agent? Start with llms.txt.

The pipeline moves from code to a running version

The Service page shows four phases.

  1. Code records the source submitted by paste, git push, or GitHub.
  2. Review detects what changed and surfaces decisions such as missing environment values or database choices.
  3. Build prepares the new version and checks that the application can be assembled.
  4. Go live starts the version, runs its release work, and makes it active after the required checks pass.

Builds can start while review decisions are still open. This lets you resolve a missing value without waiting to begin the build afterward.

Web apps switch traffic after health checks

A web app's new version starts beside the current version. Tokay sends it health checks before any visitor traffic. Both versions run until the switch finishes, usually seconds and longer while the new version comes up, so keep work that must never run twice, such as a trading loop, in a background worker, whose old version stops before the new one starts.

An app that keeps an embedded database, such as a SQLite file, in its Saved files deploys the other way. Two copies of an app must not write one database file at once, so Tokay stops the current version before the new one starts. The app is offline until the new version passes its health checks, usually a few seconds. Tokay detects the file at each deploy, and History marks each deploy that ran this way.

When the checks pass, traffic moves to the new version. When they fail, the current version keeps serving and the failed deployment records a diagnosis and boot output. Visitors do not see an unhealthy version take over.

For up to a minute after the switch, real traffic judges the new version while the previous one finishes its open requests. If most requests to the new version fail, Tokay switches back to the previous version, which keeps serving. History marks the deploy Rolled back. Its message counts the failures by status code, and its diagnosis explains them from the paths and clients Tokay recorded, so you can see what a health check alone wouldn't catch.

Blockers stop predictable failures early

Tokay blocks deployment when a required environment variable has no value, two sources conflict, or a database choice needs confirmation. The Service page names the required action.

These decisions can be resolved while the build runs. The deploy continues from the same prepared version after the blocker is cleared.

What happens on a push belongs to the Project

A Project's When you push setting decides what a push does. Tokay can deploy the affected Services automatically, run them in a preview on a copy of your data until you go live, or wait for a person to choose Update. This supports a staging Project that follows every commit and a production Project that uses the same repository but waits for approval.

Only Services whose source changed are considered for deployment.

History connects a release to its code

The Deployments tab shows every deployment with its time, commit, summary, result, and whether it required a full build. Current marks the deployment the Service runs now. Show diff displays the code changes between versions.

A changed value or a resume redeploys the same build, so several deployments can share one commit.

Rollback is another health checked deployment

To undo a deploy, restore the previous version rather than pushing the old code again. Only a restore checks the database changes released since that version and can put the data back as it was. A pushed revert leaves the newer schema in place.

Choose Restore this version on a previous successful deployment. Tokay creates a new deployment from that version and uses the normal Go live checks before it takes over.

A rollback runs no migrations, because that version's migrations already ran when it was live. When a release since then changed the database in a way the older code may not handle, the restore dialog lists those changes first. Choose Keep current data, or, while the restore point is still kept, Restore data too to put the database back as it was before those changes. Restoring loses anything written since.

The Service stays on the version you restored. Automatic deploys wait for your next push, and pausing and resuming keep the rollback in place. Deploying the Service again moves it forward to the newest code.

Rollback restores code and build output. It does not restore old Project Config, Secret, or managed resource values because current runtime settings and credentials should stay current. Some very old versions can expire, and the restore dialog explains when a version is no longer available.