Deployments

A Temps deployment runs in five steps: clone the commit, build a Docker image (your Dockerfile, or one Temps generates for your framework), start the new container, health-check it (every 2 seconds after a success, 5 after a failure), and switch traffic only after 2 consecutive successful checks. If the new container never becomes healthy, the deploy fails and the previous deployment keeps serving. Every deployment in a project belongs to one environment and keeps its own logs, image and status.


What is a deployment

A deployment is a single build-and-deploy cycle that takes your code from a Git commit (or a Docker image, or a static bundle) to a running application serving traffic. Each deployment is immutable — once created, it represents a specific version of your application at a specific point in time.

A deployment record tracks:

  • The source — which commit, branch, image, or bundle was deployed
  • The environment — which environment (production, staging, preview) received the deployment
  • The status — whether the deployment succeeded, failed, or is still running
  • The timeline — when each stage started and finished
  • The logs — full build and deploy output for every job in the pipeline
  • The container — the Docker image and running container(s) created by this deployment

Deployments are immutable. You cannot modify a completed deployment. To change what is running, you create a new deployment (by pushing code, triggering a pipeline, or rolling back).


The deployment pipeline

When a deployment is triggered, it flows through a series of jobs.

Branch deletes are ignored. When you delete a Git branch on your provider, the platform sends a push webhook where the after SHA is 40 zeros (the null SHA). Temps detects this before any pipeline work starts and discards the event — no deployment is created, no failure is logged. If you delete a branch and see nothing in the deployment list, this is expected behavior.

Diagram: Deploy Container (start + health check), Mark Deployment Complete (route switch + status), Download Repository, Build Container Image, Post-deploy jobs

In order: Download Repository, Build Container Image, Deploy Container (starts the container and health-checks it), Mark Deployment Complete (switches traffic and sets the status), then the post-deploy jobs. The steps below follow that sequence.

1. Clone repository

Temps clones your Git repository at the specified commit. For monorepos, only the configured app directory is relevant to the build.

GitLab archive downloads. GitLab normally streams the archive directly. If an instance answers with a redirect, for example to object storage, Temps follows it only over HTTPS to gitlab.com, GitLab's CDN or the instance's own host and subdomains, and does not forward the access token.

2. Build image

Temps detects your framework and builds a Docker image. The build method depends on your project:

  • Framework or language preset — Temps generates a Dockerfile for the detected (or chosen) preset; frameworks without their own preset build through autopack, Temps' built-in builder. No Dockerfile needed.
  • Dockerfile — If a Dockerfile exists in the repo root (or app directory), Temps can use it directly, with BuildKit layer caching.
  • Static preset — For static sites, Temps builds the files, extracts the output and serves it from the proxy.

Build arguments: your environment variables are passed to the build as ARG values (--build-arg), so build-time configuration such as NEXT_PUBLIC_* variables works without extra setup. Secrets are encrypted at rest and are not baked into the image unless your Dockerfile copies them in.

3. Deploy container

The built image is started as a Docker container with:

4. Health check

As part of the Deploy Container job, Temps sends HTTP GET requests to the container: 2 seconds after a success, 5 seconds after a failure. A 2xx, 3xx, 404 or 405 response counts as healthy. See How do health checks work for the exact retry behavior.

5. Route traffic

Once the health check passes, the Mark Deployment Complete job updates the reverse proxy (Pingora, Cloudflare's open-source Rust proxy) to route incoming requests to the new container and waits for the route table to confirm. The old container continues serving requests until the switch is complete.

6. Mark complete

The deployment status changes to completed. Post-deploy jobs then run in the background. They can fail without failing the deployment:

  • Cron job configuration, metric alerts and agent definitions from the repository (Git deployments)
  • Source map capture for error tracking (Git deployments that build an image)
  • Screenshot capture, only if screenshots are enabled in platform settings (off by default)
  • Vulnerability scanning with Trivy 0.58.1, only if enabled on the project (off by default). It covers Git deployments that build an image, scans library packages and records all severities

How do health checks work

Temps requires 2 consecutive successful HTTP responses before routing traffic to a new container, and fails the deployment if it isn't healthy within the startup timeout (5 minutes by default) — the previous deployment keeps serving the whole time.

The health check loop runs as follows (crates/temps-deployments/src/jobs/deploy_image.rs):

ParameterValueNotes
Check interval2 seconds after a successful check, 5 seconds after a failed oneBetween each HTTP GET attempt
Request timeout5 secondsPer individual request
Required successes2 consecutiveEach must be 2xx, 3xx, 404 or 405 — a single failure resets the counter
Startup timeout300 seconds (5 min) by defaultConfigurable from 30 to 3600 seconds under Project → Settings → Build & deploy (Startup timeout (seconds)) from v0.1.0-beta.57; fixed at 300 in v0.1.0-beta.56 and earlier. Errors and connection failures are retried until then; the deploy fails if the container isn't healthy by then

Older releases: in v0.1.0-beta.56 and earlier, the startup timeout was fixed at 300 seconds, and an app that answered with error responses (4xx other than 404/405, or 5xx) for 60 seconds in a row failed the deploy early with server returned error status codes for 60 seconds. From v0.1.0-beta.57 error responses are retried until the startup timeout.

What "2 consecutive successes" means in practice: if the container returns a 200 on check 7 but a 500 on check 8, the counter resets to 0 and must reach 2 again before traffic switches. This prevents routing traffic to a container that is flapping.

Failed health checks don't cause downtime: if the container hasn't passed its health check by the startup timeout, the deployment fails and the previous deployment's container continues serving traffic. This protection applies only before cutover — once a deployment has succeeded, nothing rolls it back automatically. To go back to an earlier version, roll back manually.

The health check probes / by default. To probe a different endpoint, set health.path in a .temps.yaml file in your repository.


Deployment states

The pipeline engine moves a deployment through pending and running, and ends it as completed, failed or cancelled. Operational actions can also persist states outside the pipeline: pause, resume, rollback, teardown and supersession write paused, deployed and stopped.

State diagram: PENDING, RUNNING, COMPLETED, FAILED, CANCELLED

In words: a deployment starts as pending, becomes running when the pipeline starts, and ends as completed once it is live. A build error or a deploy error ends it as failed, and a pending or running deployment can be cancelled, which ends it as cancelled.

StateMeaning
pendingDeployment is queued, waiting for a worker
runningBuild or deploy step is actively executing
builtDefined in the state model, but not written by the v0.1.0-beta.57 pipeline
completedFully deployed and serving traffic
failedA job in the pipeline failed. Check logs for details.
cancelledManually cancelled by a user before completion
pausedManually paused; can be resumed
deployedResumed from paused, or the state a rollback restores
stoppedContainers and resources were torn down, including when a newer successful deployment supersedes this one

A deployment can only be cancelled while in pending or running state. The normal pause/resume path moves a live deployment from completed or deployed to paused, then back to deployed. Teardown or supersession moves a deployment to stopped. If a pipeline job fails, the deployment becomes failed and its detail page shows the failing job — see Debug a failed deployment. See the CLI reference for deployments pause/deployments resume.


Jobs and stages

Each deployment is composed of jobs — discrete units of work that execute in a defined order with dependency tracking.

Job typeWhat it does
DownloadRepoJobClones the Git repository at the target commit
BuildImageJobBuilds the Docker image from your Dockerfile or a generated one
DeployImageJobStarts the container and runs health checks
DeployStaticJobDeploys pre-built static files
DeployStaticBundleJobDeploys an uploaded static bundle
PullExternalImageJobPulls a Docker image from a registry (supports private registries with auth)
VerifyLocalImageJobVerifies that an image uploaded with docker save exists locally
MarkDeploymentCompleteJobSwitches traffic to the new deployment, marks it completed and tears down the previous one
ConfigureCronsJobSets up scheduled tasks
TakeScreenshotJobCaptures a visual preview of the deployed site
ScanVulnerabilitiesJobRuns Trivy security scanning on the container image
CaptureSourceMapsJobUploads source maps for error tracking
ConfigureMetricAlertsJobReconciles metric alert rules from .temps.yaml
ConfigureAgentsJobSyncs agent definitions from the repository
CaptureSourceFilesJobUploads source for native error symbolication (opt-in)

Each job has:

  • A status (Pending, Waiting, Running, Success, Failure, Cancelled, Skipped)
  • An execution order and dependencies (jobs that must complete first)
  • A log stream with timestamped output
  • An error message if it failed

If a required job fails, the workflow stops and all pending jobs are cancelled. Post-deploy jobs are optional: if one fails, the deployment still succeeds.


Build detection

Temps picks a preset from files in the repository:

Detection signalPresetBuild behavior
docker-compose.yml / compose.yamlDocker ComposeRuns the stack with docker compose up
DockerfileDockerfileDirect Docker build
next.config.js / .mjs / .tsNext.jsServer (SSR) image
vite.config.*ViteStatic output served from the proxy. With a svelte.config.*, react-router.config.*, remix.config.* or app.config.* file, a Node.js server build (nixpacks-node) instead
rsbuild.config.ts, docusaurus.config.*Rsbuild, DocusaurusStatic output
requirements.txt, pyproject.toml, setup.py, PipfilePythonServer image
go.mod, Cargo.toml, pom.xml / build.gradleGo, Rust, JavaServer image
composer.json, Gemfile, mix.exsPHP, Ruby, ElixirServer image
nixpacks.tomlAutopack (auto-detect)Server image
index.html, with no other signalnixpacks-staticStatic site

Express, NestJS, Astro, Nuxt and plain Node.js are not detected from files — choose a preset such as nixpacks-node on the project. Laravel and Rails are offered through composer.json (nixpacks-php) and Gemfile (nixpacks-ruby). Create React App isn't detected either; choose the react-app preset. If nothing matches, the build fails and asks you to pick a preset. You can override the detected preset in project settings. See Supported frameworks, languages and build methods for the full list and port defaults.


What you can control

  • Build — use your own Dockerfile or a preset, override the install, build and start commands, and set the app directory for monorepos (build configuration).
  • Environment variables — defined on the project and assigned to one or more environments; values are encrypted at rest and applied on the next deployment (manage environment variables).
  • Resources — CPU and memory limits and replicas per environment (resources, scaling).
  • Port and health check — the port your app listens on (port resolution), and the health-check path in .temps.yaml.
  • Domains — custom domains with automatic Let's Encrypt certificates (add a custom domain).

Zero-downtime deploys

Temps uses a blue-green deployment strategy:

  1. The new container starts alongside the existing one
  2. Health checks verify the new container is ready (2 consecutive healthy responses, checked every 2 to 5 seconds)
  3. The reverse proxy (Pingora) switches traffic to the new container atomically
  4. The old container is stopped and removed

During the transition, both containers are running, and new requests go to the new container. Short requests see no downtime. Temps doesn't wait for long-running requests before it stops the old container: one still in progress at that moment can fail with a 503 or be sent again to the new container, so keep long-running work out of the request path.

If the new container doesn't pass its health check before the startup timeout (5 minutes by default), the old container continues serving traffic and the deployment is marked as failed.


Rollback

A rollback is a manual redeploy of a previous deployment. It normally reuses that deployment's Docker image, so there is no clone or build step. Traffic switches the same way as any other deploy, but the HTTP health check is different: Temps only checks that the container is running, even if .temps.yaml sets health.path, unless the target was an image or static deploy that recorded a path with --health-check-path. Temps does not roll back on its own after a deployment has succeeded — if a release misbehaves in production, trigger the rollback from the dashboard, the API or the CLI. See Rollbacks for the steps.


Build failures

The most common reasons a deployment fails:

SymptomLikely causeFix
Could not auto-detect project typeNo detection signal in the repoChoose a preset, or add a Dockerfile
Dependency install failsMissing or inconsistent lock file / manifestCommit the lock file; check package.json, requirements.txt, go.mod
Health check never passesApp listens on the wrong port or binds to 127.0.0.1Bind to 0.0.0.0 and set the project's port to the one your app uses
Container exits with code 137Out of memoryRaise the memory limit (resources)

For a step-by-step walkthrough, see Debug a failed deployment and Troubleshooting.


Deployment types

TypeTriggered byBuild step
Git pushWebhook from your Git provider when you push to a tracked branchFull build from source
Manual triggerDashboard "Redeploy" button or trigger-pipeline APIFull build from source
Docker imagedeploy/image API endpointNo build — pulls and deploys the image
Image uploaddeploy/image-upload API endpointNo build — loads the uploaded tarball
Static bundledeploy/static API endpointNo build — serves the uploaded files
RollbackDashboard rollback action or rollback API endpointNo build — reuses the Docker image from a previous deployment

Rollbacks are the fastest because they skip both the clone and build steps. They reuse the existing Docker image from a previous deployment, so they complete in seconds rather than minutes.


Viewing logs for previous deployments

Every deployment — including completed, failed, cancelled, and rolled-back ones — retains its full log output. Logs are stored per-job in JSONL format and are accessible as long as the deployment record exists. You do not need the deployment to be active or currently serving traffic to read its logs.

View build and deploy logs for a specific deployment

  1. 1

    Open your project in the dashboard and click Deployments in the sidebar.

  2. 2

    The list shows all deployments for the project, including completed and failed ones. Click a deployment row to open its detail page.

  3. 3

    On the deployment detail page, each job in the pipeline (Download Repository, Build Container Image, Deploy Container, Mark Deployment Complete, etc.) shows its log output inline. Expand a job to read its full log.

    Checkpoint: Confirm you can see log output for each job — the page title should show the deployment ID, confirming you are viewing the correct historical deployment.

Listing historical deployments

To find a previous deployment's ID, list all deployments for a project:

bunx @temps-sdk/cli deployments list --project my-app

Filter by environment to narrow the results:

bunx @temps-sdk/cli deployments list --project my-app --environment production

Add --json to get machine-readable output for scripting:

bunx @temps-sdk/cli deployments list --project my-app --json

Once you have the deployment ID, fetch its logs:

# Show the last 100 lines from each job in deployment 1234
bunx @temps-sdk/cli deployments logs --project my-app --deployment 1234

# Increase the line limit
bunx @temps-sdk/cli deployments logs --project my-app --deployment 1234 --lines 500

# Follow logs for a deployment that is still running
bunx @temps-sdk/cli deployments logs --project my-app --deployment 1234 --follow

If --deployment is omitted, the command defaults to the most recent deployment for the specified environment.

What is retained in historical logs

Each deployment job writes structured JSONL log entries that include:

  • A timestamp for each line
  • A severity level (info, success, warning, error)
  • The raw output from the build (Docker BuildKit) or the health-check runner

This means you can retrieve the exact build output from a failed deployment days after it occurred — useful for debugging intermittent build failures or comparing the build environment between a working and a broken deploy.

Access control for deployment logs

Deployment logs are scoped to the project they belong to. The same permissions that govern whether a user can view a project's deployments also control access to its logs — there is no separate log-access permission. Project roles are described in Manage team access. For application (runtime) logs, see Logs.

RoleCan list deploymentsCan read logs
OwnerYesYes
AdminYesYes
DeployerYesYes
Viewer (read-only)YesYes
No project accessNoNo

Logs are not publicly accessible. All API requests for deployment logs require a valid session token or API key scoped to the project. If you use API keys for CI/CD pipelines that retrieve logs, generate a dedicated key with the minimum required scope rather than reusing a personal token.

Last updated

Was this page helpful?