Deployments
Production and preview deployments, promoting a preview, rolling back in one step, and releasing to a share of your traffic.
A deployment is one build of your project with its own id (dep_…). Every deployment is kept as built, so going back to one never means building it again.
Production and preview
nesly deploy # goes live
nesly deploy --preview # its own address; the live site is untouched
nesly deploy --preview --alias staging # a preview address that stays the sameProduction is what your project's addresses serve. A previewgets an address of its own and changes nothing for your visitors — the way to look at a change before anyone else does. With neither flag a deploy goes live;--prod says so explicitly.
From GitHub, a push to the production branch deploys to production and other branches and pull requests get previews: see GitHub. A preview reads the preview environment's variables and gets an empty database of its own instead of production's: see environment variables.
Promoting a preview
nesly promote dep_3k2m…Promote makes a ready deployment the live release without uploading or building again: a container reuses the image you previewed, a static site the files. Its release command runs as on a deploy, and the workers, health check and site rules are the ones you checked.
Rolling back
nesly ls # deployments, newest first
nesly rollback dep_… # put an earlier production release backA rollback is instant: traffic moves to a release that already exists. In the console, the project's Overview offers Roll back to previous, and any earlier production release can be put back from Deployments.
After a rollback, automatic production deploys pause. Otherwise the next push — or a deploy hook — would bring back the release you just rolled away from. Previews keep deploying. Production resumes when you deploy or promote to it, or when you undo the rollback by rolling forward to the release that was live, which the Overview offers asUndo.
Releasing to part of your traffic
nesly deploy --percent 10 # the new release takes a tenth of visitors
nesly rollout # how the two releases are doing
nesly rollout set 50
nesly rollout promote # give the new release everyone
nesly rollout abort # send everyone back to the release that was liveThe release that is live keeps the rest of the traffic until you decide.
Other commands
nesly redeploy # build again from the connected repository, or the last upload
nesly cancel dep_… # stop a deployment that is queued or building
nesly inspect dep_… # one deployment in detail
nesly logs dep_… # its build and runtime outputredeploy without a connected repository rebuilds the newest upload for the same environment; a preview upload never goes live that way — promote it.
What the status means
| Queued, Building, Deploying | The source is being built and started. `cancel` stops it; nothing is published. |
| Ready | Built and answering. For production, the one serving your address is marked Current. |
| Failed | The build or the start did not succeed. The log says where; the live site is untouched. |
| Previous | Was production until a newer release replaced it. Kept so you can roll back to it. |
| Cancelled | Stopped before it was published. |
A build has 15 minutes. What nesly builds and how: builds.