Deploy your applicationDeploy a build

Deploy a build

A deploy runs one build in one environment and location. You create and manage deploys from the Deployments page.

What a deploy is#

A deploy is the desired state for one build: which environment and location it runs in, how many replicas, which variables, and whether it's publicly exposed. DevLyft keeps that many identical replicas (pods) running. Create a deploy with three replicas and you get three pods. Change the build and the replicas are rolled onto it; delete the deploy and its replicas go with it.

BuildsBuildImage, tag, port, CPU and memory
→
DeploymentsDeployBuild + environment + location + replicas
→
PodsReplicasOne or more running replicas
→
NodesComputeShared or dedicated nodes

Before you start#

  • A project with at least one environment. The deploy form says “This project has no environment yet — create one first.” otherwise.
  • A build in that project (“This project has no build yet — create a build first.”).
  • Any secrets the application needs, set in the target environment.

Create a deploy#

  1. Open New deploy

    DeploymentsNew deploy.

  2. Choose where it lives

    Pick the Project and the Environment. Both are fixed once the deploy exists.

  3. Select the build

    The Build list shows the project's builds as name:tag. The first one is preselected.

  4. Name the deploy

    Deploy name, for example api or web. It identifies the deploy in the table, logs and metrics.

  5. Pick tenancy

    Inherit (the default) uses the environment's tenancy. Choose Shared or Dedicated to override it for this deploy. Dedicated shows a Machine type list. See Tenancy.

  6. Pick a location and replica count

    Location lists where you can deploy; Replicas is how many copies to run, at least 1.

  7. Decide whether it's public

    Tick Publicly expose this deploy (edge ingress) to send internet traffic to the build's container port. The hint confirms it: “Traffic routed to container port 8080. Attach hostnames via Routes.”

  8. Add environment variables

    Choose + Variable for a plain KEY/value, or + Secret to reference a secret in this environment.

  9. Create the deploy

    Choose Create deploy. It appears at the top of the Deployments table and DevLyft starts its replicas.

Field reference#

Project
The project whose builds and environments you choose from. Locked when editing.
Environment
Where the deploy runs, and whose secrets and default tenancy it uses. Locked when editing.
Build
The image and resource request to run. Change it later to ship a new version or roll back.
Deploy name
A label for the deploy.
Tenancy
Inherit, Shared or Dedicated.
Machine type
Only for Dedicated. “The dedicated machine each replica runs on. Must be offered by a cluster in the selected location.”
Location
Where the deploy runs. See Locations.
Replicas
Number of copies to keep running. Minimum 1.
Publicly expose this deploy (edge ingress)
Routes internet traffic to the build's container port. Disabled when the build has no container port (“The selected build has no container port — set one on the Builds page to enable exposing.”).
Environment variables
Plain variables and secret references injected into every replica.

Tenancy#

Tenancy decides what kind of compute the replicas run on.

OptionRuns onWhen to use it
InheritWhatever the environment uses. If the environment is dedicated, its machine type too.Most deploys. Change the environment, not each deploy.
SharedShared compute: pooled capacity, billed on the CPU and memory you request.A shared deploy inside a dedicated environment.
DedicatedIsolated compute on the Machine type you pick.A dedicated deploy inside a shared environment.

The Deployments table shows each deploy's tenancy badge, and the machine type under it for dedicated deploys.

Replicas, CPU and memory#

Every replica gets the CPU and memory set on the build. The Resources column shows the per-replica figure and adds “/replica” when there's more than one, so a 0.5 CPU · 512 MB build with three replicas requests 1.5 CPU and 1.5 GB in total. To change resources on a running deploy, use Adjust resources; see CPU and memory and Replicas and scaling.

Exposing the deploy#

An exposed deploy gets a Public badge in the table. Exposure is what lets you attach routes: open Routes on the row to add a hostname under a verified domain, then publish the CNAME it shows. See Custom domains. Deploys that aren't exposed don't receive traffic from the internet.

What happens next#

  • DevLyft places the deploy on a cluster in the location. If there isn't room yet, placement stays pending and retries on its own.
  • Replicas pull the image and start. Watch them on Pods (Phase column) and read their output with Watch logs on the deploy's ⋮ menu.
  • Billing runs while the deploy's replicas run. See Usage and billing.

With the API#

API
POST /v1/projects/{project_id}/environments/{environment_id}/deploys
{
  "build_id": "…",
  "name": "api",
  "location_id": "…",
  "replicas": 2,
  "tenancy_type": "INHERIT",
  "expose": true,
  "enable_hpa": false,
  "env": [
    {"kind": "env", "key": "LOG_LEVEL", "value": "info"},
    {"kind": "secret", "key": "DATABASE_URL"}
  ]
}

Send "instance_type" as well when tenancy_type is "DEDICATED". List locations with GET /v1/locations and machine types with GET /v1/instance-types.