Deployment

Deployment

We will be using Vercel (opens in a new tab) to deploy our app. Vercel is a cloud platform for static sites and Serverless Functions that fits perfectly with our Next.js app.

Create a Vercel account

Go to Vercel (opens in a new tab) and create an account. Import your GitHub account and create a new project from the repository you created in the previous step.

Configure environment variables

Go to your project settings and add the following environment variables, replacing the local values with production values:

Variable NameValue
NEXTAUTH_URLYour production URL
NEXT_PUBLIC_APP_URLYour production URL
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEYYour Live Stripe publishable key
STRIPE_SECRET_KEYYour Live Stripe secret key
STRIPE_WEBHOOK_SECRETYour Live Stripe webhook secret
NEXT_PUBLIC_STRIPE_PRICE_IDYour Live Stripe price ID

Automatic deployments

Now everytime you push to your repository, Vercel will automatically deploy your app.