Deployment

Deploy to Vercel

Vercel is the recommended platform for deploying Next.js applications. This guide walks you through the deployment process.

One-Click Deploy

The fastest way to deploy is with Vercel's one-click deploy button. This will clone the repo to your GitHub and deploy automatically.

Deploy to Vercel

Manual Deployment Steps

  1. 1

    Create a Vercel Account

    Sign up at vercel.com using your GitHub account for the easiest setup.

  2. 2

    Import Your Repository

    Click "Add New Project" and select your scanlation-template repository from GitHub.

  3. 3

    Configure Project Settings

    Vercel will auto-detect Next.js. Set the root directory to "apps/web" if using a monorepo.

  4. 4

    Set Environment Variables

    Add all required environment variables from your .env.local file.

  5. 5

    Deploy

    Click "Deploy" and wait for the build to complete. Your site will be live!

Required Environment Variables

Add these in Vercel's project settings under "Environment Variables":

MONGODB_URI=mongodb+srv://...
NEXT_PUBLIC_SITE_URL=https://your-domain.vercel.app
NEXTAUTH_SECRET=your-generated-secret
NEXTAUTH_URL=https://your-domain.vercel.app
S3_ENDPOINT=https://your-s3-endpoint
S3_BUCKET=your-bucket
S3_ACCESS_KEY=your-access-key
S3_SECRET_KEY=your-secret-key

See Environment Variables for the complete list and descriptions.

Custom Domain

To use a custom domain instead of *.vercel.app:

  1. Go to your project settings in Vercel
  2. Navigate to "Domains"
  3. Add your custom domain
  4. Follow the DNS configuration instructions
  5. Update NEXT_PUBLIC_SITE_URL and NEXTAUTH_URL environment variables

Monorepo Configuration

If you're deploying from a monorepo structure, configure Vercel:

# Project Settings
Root Directory: apps/web
Build Command: cd ../.. && pnpm build --filter web
Output Directory: .next

After Deployment