$deploy-wizard --env production --target ec2-42.ap-south-1
🚀 Deploy Wizard v3.1.2 — Zero-Downtime Deploy
──────────────────────────────────
→ Connecting to ec2-42.compute.amazonaws.com:22...
✓ SSH connection established
→ Running pre-deploy health check...
✓ App currently healthy (uptime: 14d 6h)
→ Pulling latest from main (sha: a4f2c19)...
✓ 23 files changed, 1,847 insertions, 412 deletions
→ Installing dependencies (npm ci)...
✓ 847 packages installed in 18.2s
→ Running database migrations...
✓ Migration 0042_add_user_index.sql applied
✓ Migration 0043_orders_status_enum.sql applied
→ Building Next.js production bundle...
✓ Build complete (42.1s) — 2.1MB first-load JS
→ Decrypting environment variables...
✓ 14 environment variables loaded
⚠ Old PM2 process still running on port 3000
→ Graceful reload via PM2 cluster mode...
✓ Worker 1/4 reloaded (0ms downtime)
✓ Worker 2/4 reloaded (0ms downtime)
✓ Worker 3/4 reloaded (0ms downtime)
✓ Worker 4/4 reloaded (0ms downtime)
→ Running post-deploy smoke tests...
✓ GET / → 200 OK (84ms)
✓ GET /api/health → 200 OK (12ms)
✓ POST /api/auth/login → 200 OK (156ms)
→ Sending Slack notification...
✓ #deployments notified
──────────────────────────────────
🎉 Deploy complete! Total time: 87.4s | Downtime: 0ms
$