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 mainImport to Vercel
- Go to vercel.com and sign in
- Click "Add New Project"
- Import your GitHub repository
- 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.appUpdate OAuth callback URLs
Update callback URLs in your OAuth provider dashboards:
| Provider | Callback URL |
|---|---|
| GitHub | https://your-domain.com/api/oauth/github |
https://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)
- Go to Project Settings > Domains
- Add your custom domain
- 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