# Deployments

A deployment puts one version of your app live. The **Deployments** tab lists them, newest first.

## What happens

1. **Build.** For an app from GitHub, dudbox builds the commit. A one-click app gets its image.
2. **Wait.** An app that comes with a database (Umami and its Postgres) waits until the database accepts connections.
3. **Release.** If you set a release command in Settings, it runs once in the new version, for example to migrate the database. See [Release command](/docs/settings.md#release-command).
4. **Start.** The new version starts next to the old one.
5. **Check.** dudbox waits up to 60 seconds for the new version to answer: on its port, or on the health check path if you set one in Settings.
6. **Switch.** Traffic moves to the new version, and the old one stops. There is no downtime.

If a step fails, the deployment is **Failed**, and the version before it keeps running.

## See a deployment

Click a deployment to open it under its row. It has three tabs:

- **Overview**: each step of the deployment, with how long it took. A spinner shows the step that runs now, with its newest log line under it. A failed step shows its error. Click a step to see its part of the build log.
- **Build logs**: the whole build log, in parts by step. While the deployment runs, new lines come in at once.
- **Runtime logs**: what this deployment's app wrote to its output. It is gray until the app's container has started.

Click the row again to close it. The address of the page opens the same deployment, so you can share it.

## Statuses

- **Queued, Building, Starting**: in progress.
- **Live**: it serves your app now.
- **Failed**: the build, the release command or the check failed. The app before it stays live.
- **Cancelled**: you stopped it before it went live.
- **Replaced**: it was live, then a newer deployment took its place.

## Actions

- **Redeploy** (Deployments): starts the live version again, with no build. Do this after you change env vars. A one-click app also fetches its image again.
- **Deploy latest commit** (Deployments, apps from GitHub): builds the newest commit of the branch now.
- **Roll back to this** (a deployment's **…** menu): makes that older version live again, with no build. dudbox keeps the last 3 builds, so only recent ones can come back.
- **Cancel** (the **…** menu of a deployment in progress): stops it. The live version stays.

Scripts and agents can do all of this with the API. See [Deployments in the API](/docs/api/deployments.md).
