Loading...

Environments

Blue/green environments (preprod ⇄ prod)

Build a full preprod copy of your product — one app or a whole multi-app stack — in the same account, test it for as long as you like on its own subdomains, then switch the live domain(s) to it instantly and atomically — with a one-click rollback that also restores data.

Back to Platform Help

What it is for

  • The goal: change and test a live product without risk and without downtime. You never edit the running production app; you build a parallel copy, prove it, then flip traffic in seconds.
  • It is more than "make another app and repoint the domain": it clones the whole spec for you, links prod↔preprod so the panel/CLI know which is which, rewires app-to-app links to the preprod copies, switches all production domains together, and snapshots the database so a rollback reverts data too.
  • Use it for every meaningful release: a new image/version, a config or dependency change, a schema migration, or a multi-service change that must go live as one unit.

How it works

  • A project = a set of apps in ONE account, each labelled prod (live) or preprod (the copy). Pairing and the domain switch stay inside the account, so DNS and TLS certificates never move — that is what makes promote instant and reversible.
  • Each app keeps its own ca-*.cdn.com.tr identity subdomain for direct testing. The production domain (your real hostname) is what Promote moves from a prod app to its preprod copy.
  • Find it under the account's Platforms tab → Managed Container Apps → the "Blue/Green environments" panel (just above Your apps): create preprod (one app or the whole account), Promote and Rollback.

Multi-app products (whole project)

  • For a product made of several apps (e.g. web + api + worker), use "Create preprod from all apps": it clones every prod app into a paired preprod copy under one project.
  • App-to-app references are rewired automatically — if web points at api, the preprod web points at the preprod api, so the preprod stack is self-contained and talks to itself.
  • Promote (whole project) moves every app's production domain to its preprod copy together; Rollback (whole project) reverses them all. So a change that spans several services goes live — or is undone — as one unit.
  • You can still do a single app at a time with "Create preprod (single app)" / "Promote (single app)" when only one service changed.

Create and test a preprod

  • Pick a state mode and click Create preprod (single app, or "from all apps" for the whole account). It clones each app's image, env, secrets, resources and health check into a new preprod app.
  • Deploy the preprod app(s) and test on their own ca-* subdomains for as long as you need — production stays live and untouched the whole time.
  • When ready, click Promote; if anything looks wrong after going live, click Rollback and traffic returns to the previous apps instantly.

State (DB & static) — what preprod shares with prod

  • shared (default): preprod uses the SAME managed DB/Redis and object-storage buckets as prod, via secure cross-app references (no copy). Best for code/UI changes.
  • clone: preprod gets its OWN managed MySQL with a copy of prod's data — safe for testing data or schema changes; prod data is untouched. (Postgres data copy is not supported yet — it would start empty.)
  • isolated: preprod starts clean, with its own fresh add-ons.
  • Static files on a persistent volume can be shared (CephFS RWX) so uploads stay consistent across environments.

Reversibility & limits

  • Traffic: Promote attaches the domain to the new app first, then releases the old one (no gap); Rollback is the same switch in reverse — seconds, not a rebuild.
  • Data: Promote takes an automatic DB snapshot first, and Rollback restores it, so data changes made after going live can be reverted too.
  • Scope: everything happens inside one account, so DNS ownership and the production certificate are never affected.
  • Not (yet): cross-account promotion, Postgres data copy on clone, and fully transactional all-or-nothing promote across many apps (it is best-effort per app, with per-app error reporting).