Zero-downtime releases

Deploys without
any downtime

The new version starts next to the running one and gets traffic once it responds. If it never does, Slasha removes it and users stay on the old version.

storefront · Deploy
Current

Fix signup redirect

4be81a0

New

New pricing page

9f3c2e1

storefront.ship.acme.dev4be81a0
  1. Build image
  2. Run release command
  3. Start new containers
  4. Health check
  5. Switch traffic
  6. Stop old version

How it works

What happens on every deploy

The same steps run for a push, an env change or a rollback.

01

Start the new version

The new image starts in new containers. The running version keeps serving.

web.0 (4be81a0)  serving
web.0 (9f3c2e1)  starting

02

Wait until it responds

Slasha checks each new web container every 2 seconds until it responds or times out.

GET /  connection refused
GET /  200 OK  · ready in 4.1s

03

Switch, then stop

The proxy sends traffic to the new containers, then the old ones stop. Their image is kept for rollbacks.

storefront.ship.acme.dev → 9f3c2e1
stopping 4be81a0

Health checks

Choose what counts as ready

By default, any response on / counts, so most apps need no setup. Set a health check path and Slasha waits for a 2xx or 3xx there instead.

  • Checks every 2 seconds, 60 second timeout by default
  • Two container restarts fail the deploy right away
  • Set it in the Health Check card or with two env vars
Configure health checks
Settings → Health Check

Path

/healthz

Timeout

120 seconds

# written to the app’s env

SLASHA_HEALTH_CHECK_PATH=/healthz

SLASHA_HEALTH_CHECK_TIMEOUT=120

Default path /

2xx – 4xx is ready

Custom path

2xx – 3xx is ready

Rollback

Roll back to an earlier deploy

Each deployment keeps its image. A rollback starts it as a new deployment, with the same health check before it gets traffic.

  • The last 10 images are kept, so rollbacks don’t rebuild
  • slasha deployments rollback picks the last stopped deployment
  • Pass an ID to go further back
Managing deployments
storefront · Deployments
New pricing page9f3c2e1 · 3 min ago
Fix signup redirect4be81a0 · 2 hours ago
Node 22 upgradec71d9f4 · yesterday

Click Roll back on an older build.

Stateful apps

When Slasha stops the old version first

Two copies writing to the same volume or SQLite file can corrupt it. So if your Dockerfile declares a VOLUME or SQLite backups are on, Slasha stops the old version first. The app is down for a few moments and the data stays safe.

  • If the new version fails, the old one is started again
  • Other apps run both versions side by side
  • The managed /data volume alone doesn’t cause this
Persistent storage
Most apps no gap
4be81a0 serving
9f3c2e1 serving

Both run during the health check. Traffic switches when the new one is ready.

VOLUME or SQLite backups short gap
4be81a0
gap
9f3c2e1

One copy uses the data at a time. If the new one fails, 4be81a0 comes back.

Re-releasing

Release again without a new commit

Changed an env var or a base image? No empty commit needed. Each of these is one command or one button. The first three are health-checked like a normal deploy.

  • slasha env set KEY=value --deploy sets the value and applies it
  • Env vars are read at release, not built into the image
  • Only one operation runs per app at a time
Deployment commands
slasha …RebuildHealth check
deployments redeployRebuild the same commit
env applyRe-release with the current env
deployments rollbackRelease an earlier image
deployments restartRestart containers in placein place

More details

Checks every 2 seconds

Each new web container is checked until it responds.

Crash-loop detection

Two restarts fail the deploy right away, without waiting for the timeout.

Failed deploys are removed

Its containers are removed. The old version keeps serving.

Release phase

Run migrations once, before the new version starts.

10 images kept

Roll back to recent versions without waiting for a build.

Deploy any commit

Ship a specific SHA with slasha deploy --commit.

Failure alerts

Slack, Discord, Telegram or email when a deploy fails.

Cancel a build

Stop a long-running build from the dashboard.

Questions about releases

Have another question? Ask on GitHub.

What counts as healthy?
By default, any HTTP response from 200 to 499 on /. So if your app answers at all, it counts as up. Set a dedicated path with SLASHA_HEALTH_CHECK_PATH and Slasha then requires a 2xx or 3xx. See Health checks.
My app takes a while to boot. Will it fail?
Slasha waits up to 60 seconds by default. Raise it with SLASHA_HEALTH_CHECK_TIMEOUT (in seconds), or from the Health Check card in the app’s settings. If a container restarts twice, Slasha treats it as a crash loop and fails the deploy right away.
What happens to workers during a deploy?
New workers start with the new version, and the old ones stop when traffic switches. Only web processes get a health check, because they’re the only ones that get traffic.
Is it always zero downtime?
No. If your Dockerfile declares a VOLUME or you’ve turned on SQLite backups, two copies of the app can’t safely share the data. In that case Slasha stops the old version first, so there’s a short gap. If the new one fails, Slasha starts the old one again.
Do migrations run before the switch?
Yes. A release: command in your Procfile runs once in its own container before the new version starts. If it exits non-zero, the deploy stops and the current version keeps running. The old version keeps serving for a few seconds after migrations run, so write migrations it can work with.
How far back can I roll back?
Slasha keeps the last 10 images per app, so rolling back to one of those doesn’t need a build. You can still roll back to older deployments. Slasha rebuilds them from their commit.

Other features

All features

Deploy without downtime on your own server

Install Slasha on a server and push your first app in about ten minutes.

$curl -fsSL https://slasha.com/setup.sh | bash