Skip to content
prod 352bb92
Browse

Phase 12 · Deploy to production

You are here: PlaybookPhase 12 · Deploy to production This phase is for you if: staging is verified and you’re ready to pull the production trigger — rollback stays one command away. Not this phase? Phase 5 = staging first · Phase 11 = pre-customer gates.

The final gate: take the staging-verified app live without losing anything if it goes wrong. Phase 12 is not a sequential step you grind through — it’s a trigger you pull when staging is verified and you’re ready. Every move here keeps a rollback one command away.

Phase 12 — production cutover, rollback always ready

Phase 12 — production cutover, rollback always ready 1. Pre-flight (P0 · rotate + audit) → 2. DNS / TLS ready (prereq · domain + SSL) → 3. First prod release (P2 · deploy + install) → 4. Smoke test (P9 · verify live) → 5. Monitor + rollback-ready (24–48h) Pre-flight P0 · rotate + audit DNS / TLS ready prereq · domain + SSL First prod release P2 · deploy + install Smoke test P9 · verify live Monitor + rollback-ready 24–48h
Pull the trigger when staging mirrors production. Each stage gates the next; the last stage is steady-state, not a finish line.

Phase 12 can fire on three paths depending on your risk tolerance. Pick one — don’t drift between them.

PathWhen to useFlow
Fast launchNeed production ASAPCore phases on the selected non-production target → go live → harden + polish there → redeploy
Hardened launchWant everything right firstAll phases on the selected non-production target → go live → final verification
IterativePrefer gradual refinementCore phases → go live → polish on the selected non-production target, redeploy after each batch

Confirm every item before any deploy step runs:

  • Entry gate (Task P.0) — Phase 12 production is blocked unless the Phase 10-CONSOLIDATED verdict (Admin-Local/1-Project/4-Audit-Reports/...-phase-10-CONSOLIDATED.md) is 🟢 GO or an explicitly accepted 🟡 CONDITIONAL GO. 🔴 NO-GO = hard block, no exceptions. A missing verdict = STOP — deploy nothing.
  • Production environment row exists in Zaj-PROJECT.md — URL/domain, hosting account, SSH alias, host/user/port, deploy target, source branch, DB name, web PHP, CLI PHP binary, credential pointer, noindex/robots posture, and last verified date are filled and current.
  • Staging deploy immediate gate complete — app live on the selected non-production target, schema verified, rollback proven, agent-drivable monitor/auth sweeps clean, and any passive 24–48h watch or human-only journeys tracked. For production cutover, the passive watch must be completed or explicitly accepted in the launch decision.
  • Superadmin setup done on the selected non-production target — branding, SMTP, payments, and legal pages all configured.
  • Server setup verified on the production account (it may be a different host from staging — server setup runs on each).
  • Production database created (empty) in the hosting panel.
  • Production .env template prepared in your secrets manager / project vault — placeholders only, never committed.
  • Production DNS + TLS ready — the production A record resolves to the current origin IP from Zaj-PROJECT.md, the origin cert / Let’s Encrypt cert is issued, and any Cloudflare proxy is Full (Strict). A public Cloudflare 525 is a hard block, not an app-deploy state.
  • Rollback plan reviewed, emergency contacts documented, and stakeholders notified of the deploy window.

How you seed the production database decides how much work you repeat.

OptionProsCons
Fresh installerClean DB, no URL/encryption issuesRedo all superadmin config (1–2h)
Copy verified non-production DBSkip admin config (~10 min)Must find/replace non-production→production URLs; watch app-key-encrypted columns
HybridBest of bothFresh install, then selectively import settings/plans; needs SQL comfort

For a first production deploy, Fresh installer is safest — it avoids encryption-key mismatches and URL find/replace errors. Copy a verified non-production DB only once the process is routine and the source environment row is current in Zaj-PROJECT.md.

Two ways to run this: Whole Phase → click the button; one Part → open the Part document and click Run this Part. Skill users can run /zaj-laravel-codecanyon phase 12 instead.

Start with Pre-flight — never skip it.