Releases & rollbacks
Ship every release through automatic canaries, binding checks and rollbacks
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.
What breaks vs. how Gregale solves it
Blind all-at-once container swaps turn bad configs, broken migrations and Friday-night pushes into customer-facing outages with fragmented manual recovery.
Problem without Gregale
One-shot cutovers send 100% of live production traffic to broken builds at once.
How Gregale solves it
Default progressive rollouts climb 1% -> 10% -> 50% -> 100% and roll back automatically on 5xx spikes, crash loops or latency regressions.
Problem without Gregale
Code rollbacks leave incompatible Postgres schema changes or broken env secrets behind.
How Gregale solves it
Paid plans support `gregale rollback --restore-databases` PITR restores, plus automatic snapshot invalidation on every secret rotation.
Problem without Gregale
CI passes unit tests while production breaks on missing DB URLs or Friday deploys.
How Gregale solves it
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 (7)
Canary deploys with automatic rollback
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
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
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
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
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
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
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 references
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-databasesrestores 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.