Deployment

Deploy Fastly to production environments

This guide covers deploying Fastly to Vercel.

Prerequisites

Before deploying, ensure you have completed the Environment Setup for local development.


Vercel Deployment

Push to GitHub

Ensure your code is pushed to a GitHub repository:

git add .
git commit -m "Prepare for deployment"
git push origin main

Import to Vercel

  1. Go to vercel.com and sign in
  2. Click "Add New Project"
  3. Import your GitHub repository
  4. Vercel auto-detects Next.js settings

Configure environment variables

Add all environment variables from your .env.local file in the Vercel dashboard. Update the following for production:

NEXT_PUBLIC_APP_URL=https://your-domain.vercel.app

Update OAuth callback URLs

Update callback URLs in your OAuth provider dashboards:

ProviderCallback URL
GitHubhttps://your-domain.com/api/oauth/github
Googlehttps://your-domain.com/api/oauth/google

Deploy

Click "Deploy" and Vercel will build and deploy your application.

Your app will be available at https://your-project.vercel.app.

Configure custom domain (optional)

  1. Go to Project Settings > Domains
  2. Add your custom domain
  3. Configure DNS records as instructed

After adding a custom domain, update NEXT_PUBLIC_APP_URL and OAuth callback URLs to match.


Pre-Deployment Checklist

Before going live, verify:

  • JWT secrets are unique and 32+ characters
  • Database credentials are production-only
  • OAuth apps use production callback URLs
  • HTTPS is enabled
  • Email service is configured and tested
  • Build completes without errors

Troubleshooting

On this page