wtree Cloud

Rollbacks

Revert a bad release automatically with health checks, or return to any earlier deployment from your registry.

wtree Cloud offers two rollback mechanisms.

MechanismTriggerReverts to
Swarm automatic rollbackA new deployment fails its health checkThe previous version
Registry rollbackYou click RollbackAny earlier deployment

Automatic rollback

Docker Swarm reverts to the previous version when a deployment fails its health check.

Before you start

  • A health endpoint, for example /health returning 200. The examples assume port 3000.
  • curl inside the container. Alpine images don't include it.

Configure

Open Settings › Resources, then click Swarm settings in the Cluster settings card.

Paste into Health check. Durations are nanoseconds.

{
  "Test": ["CMD", "curl", "-f", "http://localhost:3000/health"],
  "Interval": 30000000000,
  "Timeout": 10000000000,
  "StartPeriod": 30000000000,
  "Retries": 3
}

Paste into Update config.

{
  "Parallelism": 1,
  "Delay": 10000000000,
  "FailureAction": "rollback",
  "Order": "start-first"
}

The same health check also gives you zero-downtime deploys.

Registry rollback

wtree Cloud pushes each deployment's image to your registry under a unique tag and links the deployment to it. You can then roll back to any deployment, not only the last one.

Before you start

  • A registry configured in wtree Cloud (Docker Hub, GHCR or custom) with credentials. See Registries.

Enable

Open the application, then Deployments and click Configure Rollbacks.

Turn on Enable rollbacks.

Select the Rollback registry and click Save settings.

Each deployment now has a Rollback button.

Roll back

  1. Open Deployments and find the target deployment.
  2. Click Rollback and confirm.

wtree Cloud first pulls the image from the registry, so the container takes a few seconds to appear in Logs.

On this page