Skip to content

14 Deployment

Vicky Patel edited this page Sep 14, 2026 · 1 revision

14. Production Deployment & Operations Runbook

Step-by-step production deployment instructions, environment configuration, and operational verification.


๐Ÿš€ Deployment Overview

PACT OS is designed for deployment on Vercel Cloud Edge paired with Supabase PostgreSQL:

graph LR
    Git[Git Repository main branch] --> Vercel[Vercel Edge Platform]
    Vercel --> Build[Next.js Production Build]
    Build --> Functions[Serverless / Edge Functions]
    Functions --> Supabase[(Supabase PostgreSQL Database)]
    VercelCron[Vercel Cron Sweeper] -->|Every Minute| Sweeper[/api/cron/sweep-deadlines]
Loading

๐Ÿ“‹ Pre-Deployment Checklist

  • All 26 SQL migrations pushed to production Supabase instance (npx supabase db push).
  • Environment variables configured on Vercel Dashboard.
  • CRON_SECRET generated and synchronized between Vercel and API route.
  • Row Level Security (RLS) enabled on all 26 tables.
  • Domain name and SSL certificates provisioned.

๐Ÿ”‘ Production Environment Variables

Variable Description Security Level
NEXT_PUBLIC_SUPABASE_URL Production Supabase URL Public
NEXT_PUBLIC_SUPABASE_ANON_KEY Supabase Anonymous Key Public
SUPABASE_SERVICE_ROLE_KEY Supabase Service Role Key CONFIDENTIAL (Server-Only)
CRON_SECRET Timing-safe Bearer secret for /api/cron/sweep-deadlines CONFIDENTIAL (Server-Only)
NEXT_PUBLIC_APP_URL Authoritative production domain (e.g. https://pactos.app) Public

๐Ÿ› ๏ธ Step-by-Step Deployment Guide

Step 1: Database Migration Execution

Pushes the 26 frozen SQL migration files to the production PostgreSQL database:

npx supabase db push --linked

Step 2: Vercel Production Deployment

# Production Build & Deploy
vercel --prod

Step 3: Post-Deployment Smoke Verification

Run automated staging/production smoke verification tests:

npm run release:check

Verify that /api/health returns status 200 OK and database connectivity status ok.

Clone this wiki locally