Real World Example

Choosing a Hosting Setup

StageTypical setupExample
Side project / MVPVercel Hobby/Pro + Neon or Supabase PostgresA student startup landing page and waitlist
Growing startupDocker on Cloud Run / ECS, managed Postgres, Cloudflare CDNA D2C brand doing 50k orders a month
Cost-sensitive / full controlVM + pm2 + nginx (+ Redis cache handler)An edtech or job portal on a single GCP VM
Large companyKubernetes, multiple regions, shared cache, CDNBig e-commerce and streaming sites

Deploy Checklist

  1. npm run build passes locally and in CI.
  2. All env variables set in the target; secrets not prefixed with NEXT_PUBLIC_.
  3. Database migrations run before the new version starts (prisma migrate deploy).
  4. HTTPS, www → apex redirect, caching headers for /_next/static.
  5. Health check endpoint (/api/health) for the load balancer / uptime monitor.
  6. Error tracking (Sentry) and logs available.

Example

curl -s https://shopease.in/api/health

Example output

{"status":"ok","version":"1.4.2","db":"up"}