stackapRequest access

Product

Rollbacks

A Stackap rollback re-activates the previous deployment with one command, health-checking it first, using the same switch a normal deploy uses.

What it does

After each successful deploy, Stackap keeps the previous version as a rollback target. If the new version turns out to be wrong in a way a health check cannot see, run stackap rollback <slug>. The previous deployment is re-activated, checked, and only then given traffic.

A rollback is not a special emergency mode with its own risks. It is the ordinary swap from a deploy, pointed backwards. That means it inherits the safety of the forward path: if the older version will not start or fails its health check, routing does not change and the current version keeps serving.

It is worth separating rollback from a different protection that is easy to confuse with it. A build that fails, or a container that is unhealthy, never goes live in the first place, so there is nothing to roll back. Rollback is for the case where the new version was healthy by every automated measure and was still the wrong version.

How it works

The sequence is short and every step is recorded in the audit log with who ran it:

  1. You run the command for a project. Stackap looks up the previous deployment of that project.
  2. It re-activates that deployment and polls its health endpoint until it answers or times out.
  3. If healthy, the routing table is updated inside a database transaction and Caddy sends traffic to it.
  4. If not healthy, nothing changes, and the command reports why.
Tested the unpleasant way

The deploy path was exercised with a deliberately broken release. The broken build never went live, the earlier version kept serving, and the failure was recorded. A system that only works when everything works is a demo, not a platform.

In practice

$ stackap deployments my-app      # see what is available
$ stackap rollback my-app         # go back to the previous deployment
$ stackap logs my-app --source runtime

Early-access scope

Questions

Does a rollback undo my database?
No. It swaps the running application only. Databases are protected separately by encrypted, restore-verified backups, which can be restored into a new database.
How quickly does a rollback take effect?
As fast as the older version starts and passes its health check, followed by the routing change. We have not published a measured figure, so we do not quote one.
Can an agent run it?
Yes. It is an ordinary CLI command and an HTTP API call, with no interactive prompt. See the CLI reference.

Stackap is in early access. Tell us what you run and we will reply with a straight answer about whether it fits.

Ask for an invitation

Last updated .