ShipDesk
Task Manager
ShipDesk
Progress
09

Production Deployment

Vercel deploy, env vars, DNS switch, monitoring, go-live

Week 122–3 daysEstimated: 12h totalLaunch
After go-live: what changes immediately
Within 24–48hrs: Google starts indexing. Within 1 week: AI crawlers can read and cite your content. Your site goes from invisible to fully discoverable.
Deployment Steps (in order)
Push Frontend-Next/ to GitHub
10 min
Import to Vercel — auto-detected as Next.js
5 min
Add all env variables in Vercel
10 min
Update Backend CORS — add Vercel URL to allowedOrigins
15 min
Test on Vercel preview URL
1–2 hrs
Switch DNS
30 min
Enable Vercel Analytics
2 min
Submit sitemap to Search Console
15 min
Rollback Plan — If Something Breaks
Document DNS rollback steps — switch A/CNAME records back to old frontend — know the exact values
15 min
Keep old Frontend/ deployed as fallback — don't delete the old Vercel/Netlify deployment for at least 1 week
5 min
Monitor error rates for 48 hrs post-launch — use Vercel Analytics + Sentry — watch for 500s, auth failures, CORS errors
2 hrs
Test Socket.io reconnection after domain switch — verify real-time notifications still work on new domain
30 min
Express — CORS update for Vercel
// In your Express app (e.g., server.js or app.js)
const allowedOrigins = [
  'http://localhost:3000',           // Local dev
  'https://medicare.vercel.app',     // Vercel preview
  'https://medicare.com',            // Production
  'https://www.medicare.com',        // Production www
]

app.use(cors({
  origin: (origin, callback) => {
    if (!origin || allowedOrigins.includes(origin)) {
      callback(null, true)
    } else {
      callback(new Error('Not allowed by CORS'))
    }
  },
  credentials: true, // Required for cookies
}))
Express — cookie flags for production
// Update your cookie settings for production domain
res.cookie('auth-token', token, {
  httpOnly: true,
  secure: true,                    // MUST be true on HTTPS
  sameSite: 'lax',                 // 'lax' for same-domain
  domain: '.medicare.com',         // Shared across subdomains
  maxAge: 7 * 24 * 60 * 60 * 1000,
  path: '/',
})
DNS propagation takes 1–48 hours. During this window, some users see old site, some see new. Monitor both. Don't delete the old deployment until propagation is complete.
Previous
Phase 08 — Testing & QA
Next
Phase 10 — DevOps & Production Readiness