# Ship every release through automatic canaries, binding checks and rollbacks

Gregale Solutions · Releases & rollbacks · Updated 2026-11-26

> Every production deployment starts at 1% traffic, rolls back automatically on 5xx errors or latency regressions, verifies DB/S3/service bindings pre-cutover, and can restore both code and managed Postgres together.

Blind all-at-once container swaps turn bad configs, broken migrations and Friday-night pushes into customer-facing outages with fragmented manual recovery.

## What breaks vs. how Gregale solves it

| Problem without Gregale | How Gregale solves it |
|---|---|
| One-shot cutovers send 100% of live production traffic to broken builds at once. | Default progressive rollouts climb 1% -> 10% -> 50% -> 100% and roll back automatically on 5xx spikes, crash loops or latency regressions. |
| Code rollbacks leave incompatible Postgres schema changes or broken env secrets behind. | Paid plans support `gregale rollback --restore-databases` PITR restores, plus automatic snapshot invalidation on every secret rotation. |
| CI passes unit tests while production breaks on missing DB URLs or Friday deploys. | Pre-promotion binding checks (`--require-bindings`), OpenAPI contract gates, MFA human approvals and recurring deploy freezes block bad ships before traffic moves. |

## Deep-dive guides

- [Canary deploys with automatic rollback](https://gregale.dev/articles/canary-deploys.md): Every production release on Gregale goes to 1% of traffic first, moves up in stages on clean evidence, and rolls back on its own on 5xx errors, crash loops or a latency regression.
- [Roll back a bad migration: code and database together](https://gregale.dev/articles/rollback-code-and-database.md): Rolling back code after a migration runs old code on the new schema. On Gregale, `gregale rollback --restore-databases` restores the managed PostgreSQL database to the moment before the migration as a new database and switches the app to it with the earlier code, keeping the original and its writes.
- [Stop Friday-night outages with deploy freezes, approvals and scheduled rollouts](https://gregale.dev/articles/deploy-freezes-release-approvals-schedules.md): Require signed-in human MFA approvals (`--approvals 2`), enforce recurring weekend or post-rollback deploy freezes (`--after-rollback 1h`), and build releases early to roll out automatically during quiet windows.
- [Pre-traffic service binding verification for Postgres, S3 and queues](https://gregale.dev/articles/pre-traffic-service-binding-verification.md): Probe `.internal` service routes, managed PostgreSQL (`SELECT 1`), object storage (`ListObjectsV2`) and push-queue consumers on your exact candidate release with `gregale app binding verify` and enforce gates inside promotion transactions.
- [Promote tested staging artifacts to production without rebuilding](https://gregale.dev/articles/promote-staging-to-production-without-rebuilding.md): Promote exact staging build artifacts and pinned non-secret config to production with `gregale environment promote --sync-config` while keeping production secrets separate, with dark health rounds, service-graph rewiring and migrations rolling out per account.
- [Block breaking OpenAPI changes and probe routes before traffic shifts](https://gregale.dev/articles/openapi-breaking-change-deploy-gate.md): Validate OpenAPI changes with `gregale api spec preview`, `diff` and hash-pinned `apply`—exiting `2` on breaks and `3` on `UNKNOWN` schema changes while blocking promotion—and probe up to ten `x-gregale-hosting-check: true` GET routes on the exact candidate.
- [Rotate and revoke secrets without restarting containers or leaking snapshots](https://gregale.dev/articles/zero-restart-secret-rotation.md): Every secret mutation on Gregale invalidates memory snapshots so restored VMs never serve stale keys, `--restart` performs a draining rolling replacement, and images with `com.gregale.secret-reload-signal` hot-reload in-process with verifiable acknowledgements.

## Documentation

- [Canary rollouts](https://gregale.dev/docs/rollouts.md)
- [Releases & rollbacks](https://gregale.dev/docs/releases.md)
- [Approvals, freezes & schedules](https://gregale.dev/docs/release-controls.md)
- [Service binding verification](https://gregale.dev/docs/service-bindings.md)
- [Environment promotion](https://gregale.dev/docs/environment-promotion.md)
- [OpenAPI deploy checks](https://gregale.dev/docs/api-hosting-openapi.md)

## Questions

### Do canary deploys and automatic rollbacks require extra configuration?

No. Every HTTP production release on Gregale uses 1% -> 10% -> 50% -> 100% progressive canary stages and automatic 5xx/crash rollback by default across all plans.

### What happens if an automatic rollback crosses a database migration?

Automatic rollbacks never blindly move older code onto a newer schema; they keep the current release serving and notify you. On paid plans, `gregale rollback --restore-databases` restores managed PostgreSQL to the release timestamp alongside earlier code.

### Can deploy freezes or OpenAPI checks block emergency rollbacks?

No. Deploy freezes block new forward production releases (`release_frozen`), while rollbacks to previously serving versions always remain open.

Canonical URL: https://gregale.dev/solutions/safe-production-deploys

