Your first deploy
You will make a project deployable, ship it, and confirm it is running — using only real commands and config.
By the end you will have added one file (infra/runtime.json), run one command
(putnami deploy), and released a revision attributable to your commit.
Before you start
Complete the earlier steps once:
- Install the cloud extension —
putnami deps add @putnami/cloud - Log in —
putnami cloud login - Set up the workspace —
putnami cloud setup
You also need a project that builds:
putnami build1) Declare how the project runs
Add infra/runtime.json to the project. Its presence is what makes the project
deployable. A minimal scale-to-zero service:
{
"ingress": { "domains": ["hello.example.com"] },
"scaling": { "min": 0, "max": 2, "concurrency": 500 }
}ingress.domains— the hostname(s) the service answers on. For an internal-only service, use{ "public": false }instead.scaling.min: 0— the service scales to zero when idle and cold-starts on the next request. Setmin: 1to keep one instance warm.
See Deploy & hosting for every field.
2) Deploy
putnami deploy --wait--wait blocks until the new revision is Ready (or --timeout fires, default
5m). Deploy runs two stages:
putnami deploy
├─ publish build + push the image, register config, apply migrations
└─ release roll out a new revision, then cut traffic overThe release is zero-downtime: the previous revision keeps serving until the new one is Ready.
3) Preview the plan first (optional)
To see what a deploy would do without provisioning anything — and without publishing — ask for the plan:
putnami deploy --previewIt reports a per-project skip or roll decision from the control plane.
Nothing is pushed or released.
4) Confirm it
putnami cloud config # the config the running revision resolves
putnami cloud whoami # the identity that owns the deployIf the deploy failed, re-read the CLI output: deploy failures are reported with the failing stage and reason.
Redeploy and roll back
- Redeploy by running
putnami deployagain. Unchanged projects are skipped (their content digest is identical); use--forceto re-roll anyway. - Roll back is an operator workflow today. The serving revision is retained, but the public cloud CLI does not yet expose a revision-revert command.
Next
- Managed runtime — scaling, config & bindings
- Database — datasources and migrations
- Observability — logs, metrics, traces