Deployments & rollbacks

Ship to any environment with gated approvals, health checks, and one-command rollback.

A deploy stage targets an environment. Environments carry their own secrets, protection rules, and deploy history.

Deploy to an environment#

Shell
poyesis deploy --env production

Or as a pipeline stage that runs automatically after tests pass:

poyesis.yaml
pipeline:
  - stage: deploy
    needs: [build, test]
    environment: production
    run: poyesis deploy --env production

Health checks#

Attach a health check so a deploy is only marked successful once your service responds.

poyesis.yaml
  - stage: deploy
    environment: production
    healthcheck:
      url: https://api.poyesis.dev/healthz
      expect: 200
      timeout: 90s
    run: poyesis deploy --env production

If the health check fails within timeout, the deploy is marked failed and — when autoRollback is enabled — the previous release is restored automatically.

Rollback#

Every deploy is versioned. Roll back to the previous release in one command:

Shell
poyesis rollback --env production

Or pin a specific release:

Shell
poyesis rollback --env production --to release_8f21c4
1
List recent releases
Shell
poyesis releases --env production
2
Roll back

Poyesis re-points the environment at the chosen release and re-runs its health check.

3
Confirm

The dashboard shows the active release and who triggered the rollback.

Rollback restores your application, not your data. Database migrations are not reversed automatically — design migrations to be backward compatible.

Deploy strategies#

Replace instances in batches. The default — zero downtime, no extra capacity needed.