Documentation

Deployment

Learn how to deploy your Dirstarter project to Vercel

Dirstarter is built with Next.js, which means you can deploy it to any platform that supports Next.js applications. Since it is a framework built by Vercel, you will get the best developer experience and performance when deploying to Vercel.

This guide will walk you through the deployment process for Vercel. We'll be adding more deployment guides for other platforms in the future.

Prerequisites

Before deploying your Dirstarter project, make sure you have:

  1. A Git repository with your project
  2. An account on Vercel
  3. Your project's environment variables configured for production

Deployment Steps

Push your code to a Git repository (GitHub, GitLab, or Bitbucket)

Go to Vercel Dashboard and click "Add New Project"

Import your Git repository

Vercel Import

Configure your project settings:

  • Framework Preset: Next.js
  • Build Command: npm run build (or yarn build if using Yarn)
  • Output Directory: .next
  • Install Command: npm install (or yarn install)

You can leave the default settings if you're not sure what to do.

Add your environment variables:

DATABASE_URL="your_database_url"
BETTER_AUTH_SECRET="your_secret"
BETTER_AUTH_URL="your_vercel_url"
...

Click "Deploy" and your project will be deployed.

Automatic Deployments

Vercel automatically deploys your application when you:

  • Push to the main branch
  • Create a new pull request
  • Push to a branch with a preview deployment enabled

Every pull request gets a unique preview URL, making it easy to test changes before merging to production.

Custom Domain

  1. Go to your project settings in Vercel
  2. Navigate to the "Domains" section
  3. Add your custom domain
  4. Follow the DNS configuration instructions
Edit on GitHub

Last updated on

On this page