deploYmentDeploy Codebase

Deployment

Deploy Codebase

There are a lot of different services to deploy your codebase. This guide will show you how to deploy your project on Vercel.

  1. In the Vercel Dashboard → Click on ADD NEW...PROJECT

  2. Import the repository that you want to deploy (e.g. nextjs-boilerplate)

  3. Update all key-value pairs from your .env.local file under Environment Variables.

  4. Hit the DEPLOY button. Your project will be available in 2-5 minutes.

Set up a Custom Domain

Follow these steps to add your own domain to your project:

This project setup uses an .app domain for the app because the root domain (e.g. www.exampledomain.com) is already used by Framer for the landing page.

Connect a Custom Domain (Subdomain)

  • In the Dashboard → Click on SETTINGSDOMAINS
  • Click on ADD and enter your app subdomain (e.g. app.example-domain.com)
  • Update the necessary DNS settings at your domain provider (e.g. Squarespace Domains). The DNS settings should be a CNAME record with NAME: app and VALUE: cname.vercel-dns.com.

Include Environment Variables

  • Once your domain is set up, click on the three dots (…) next to your project
  • Click on SETTINGSENVIRONMENT VARIABLES
  • Find NEXT_PUBLIC_SITE_URL
  • Replace the old value with your new domain (e.g. https://app.example-domain.com)

Redeploy The Project

  • If you’ve changed your environment variables, you will need to redeploy your project.
  • Click on your project → DEPLOYMENTS, find the latest deployment, click on the three dots (…) and select REDEPLOY.