Vercel Deployment
Add a concise value statement that captures reader interest and previews content value. Focus on benefits while keeping it under two lines. Align with your blog categories.
## Prerequisites
- GitHub/GitLab account connected to Vercel
- PostgreSQL database (Railway, Supabase, or Vercel Postgres)
- Your repository pushed to GitHub
## Step 1: Import Project
1. Go to vercel.com and click "Add New Project"
2. Import your GitHub repository
3. Vercel auto-detects Next.js and Turborepo
## Step 2: Configure Build Settings
**Root Directory:** apps/web
**Build Command:** (auto-detected)
**Output Directory:** (auto-detected)
## Step 3: Environment Variables
Add these in Vercel dashboard:
- DATABASE_URL: Your PostgreSQL connection string
- PAYLOAD_SECRET: Generate with: openssl rand -base64 32
- NEXT_PUBLIC_SITE_URL: Your production domain
## Step 4: Deploy
Click "Deploy" and Vercel will:
1. Install dependencies
2. Run build with Turborepo caching
3. Deploy to edge network
4. Assign you a preview URL
## Step 5: Custom Domain
In Vercel dashboard:
1. Go to Settings > Domains
2. Add your custom domain
3. Update DNS records
4. SSL is automatic
## Post-Deployment
**Run database migrations:**
In Vercel dashboard, go to your project settings and set up a deploy hook to run migrations, or manually run:
```bash
DATABASE_URL=your_prod_url pnpm --filter=web db:migrate
```
