Every deploy runs a release: a numbered snapshot of your app. You follow deploys on your app’s Deploys page.
Releases
A release is an unchangeable snapshot of:
- the image, pinned by its digest, so it always runs exactly the same image;
- your variables and secrets;
- each process’s command and port.
Releases are numbered per app: v1, v2 and so on.
Scale isn’t part of a release. Changing a size or an instance count never makes one, and rolling back never undoes one.
What starts a deploy
| Trigger | What you did |
|---|---|
| Manual | Chose Deploy at the top of the app’s page |
| Push | Pushed to the app’s branch on GitHub, with automatic deploys on |
| Config change | Chose Deploy changes after saving variables, processes or the release command |
| Rollback | Chose Roll back on the Deploys page |
Apps from a container image
Deploy reads the image’s tag again and pins the digest it finds. So after you push a new image under the same tag, choose Deploy to run it.
The image must have a linux/amd64 version.
When you change the image in Settings, the app shows Changes not deployed yet, with Deploy the new image.
Builds from GitHub
Deploy, or a push with automatic deploys on, builds the commit with its Dockerfile, in an instance of its own.
- Output: the build’s output streams live under Build output on the deploy’s page, and its end is kept with the deploy.
- Cache: each app keeps a layer cache, so a build with unchanged layers takes seconds.
- One at a time: an app builds one commit at a time. A newer push replaces a build that’s still waiting in the queue; a running build finishes.
- Builds at once: how many of your apps can build at the same time depends on your limits. See Limits.
- Time limit: a build may run for up to 30 minutes. A longer one is stopped, and the deploy fails.
- On GitHub: the commit shows pending, then success or failure. A build replaced by a newer push, or cancelled, shows “Superseded by a newer push” or “Cancelled”.
- Billing: builds are billed by the second while they run, at the builder’s size. The Create app form shows its price. Waiting in the queue is free. A failed or cancelled build is billed for the time it ran.
Your organisation needs a positive balance to build.
Variables during builds
Builds don’t see your variables unless you turn on During builds for each one, on the Variables page. It’s off by default.
- A plain variable arrives as a build argument. Declare it with
ARG. - A secret arrives as a build secret, which a
RUNstep mounts. It’s never written into the image.
ARG APP_ENV
RUN --mount=type=secret,id=NPM_TOKEN \
NPM_TOKEN=$(cat /run/secrets/NPM_TOKEN) npm ci
The release command
A release command runs once before each deploy replaces anything: database migrations, for example.
- Open your app’s Settings.
- Enter the Release command, such as
php artisan migrate --force. - Choose Save settings. It applies from the next deploy.
How it runs:
- in its own new instance of the new release, with your variables and secrets;
- at the size of your web process, billed by the second like any instance;
- without your volumes. If your app keeps SQLite on a volume, run its migrations from the process’s own start command instead;
- with your private network, so it can reach a database at
db.internal.
It must exit with code 0 within 15 minutes. Otherwise the deploy stops, the current release keeps serving, and the deploy’s page shows the command’s output. Values of your secrets are hidden in that output.
How a deploy rolls out
A deploy goes Queued, Building, Releasing, Deploying, then ends Succeeded, Failed or Cancelled.
- The web process rolls one instance at a time: a new instance starts, passes its health check and joins the traffic, then an old one finishes its requests and stops. Visitors see no errors.
- Other processes start all their new instances; the old ones stop once every new one is healthy.
- A process with a volume stops, then starts the new release on the same volume: a few seconds when it doesn’t answer. Deploy asks you to confirm first. If the new release fails its health check, the old one starts again on the same volume. The volume itself isn’t rolled back: what the new release wrote stays.
- A sleeping app deploys as usual, and sleeps again after its quiet minutes.
While a deploy is queued or building, Cancel deploy stops it. Nothing is replaced.
When a deploy fails
A deploy can fail at the build, the release command or the health check. Then:
- the release that was serving keeps serving: nothing is replaced, except that a process with a volume starts its old release again (see above);
- the deploy’s page says why, with the output;
- we email you. You can turn that email off under Settings → Notifications.
Rolling back
- Open Deploys, and find the release you want.
- Choose Roll back.
- If your app has a release command, choose whether to tick Run the release command again. It’s off by default, since it already ran for that release.
- Choose Roll back to that release.
The release runs again exactly as it was: the same image, variables and process settings. Scale stays as it is now. The current release keeps serving until the new instances are healthy.
You can roll back to recent successful releases; the Deploys page says how many.
Deploy history
Deploys lists each deploy with its release, status, source (a commit or an image digest), trigger, duration and start time. Open one to see its steps and output.