Deploying to Vercel
A step-by-step guide to deploying the monorepo applications to Vercel.
Deployment
This guide covers deploying the monorepo to Vercel, a popular platform for hosting Next.js applications.
Prerequisites
- A Vercel account
- Access to the monorepo
Steps to Deploy
-
Import the Repository
- Log in to your Vercel account.
- Click on "New Project" and select "Import Git Repository".
- Connect your Git provider and select the monorepo.
-
Configure Project Settings
- For each application (e.g.,
web), create a separate Vercel project. - Set the root directory for each project:
- For the Web app, set the root to
apps/web.
- For the Web app, set the root to
- Configure the build and output settings
- For each application (e.g.,
-
Set Environment Variables
- In the Vercel dashboard, navigate to the "Settings" tab of your project
- Add the necessary environment variables as defined in
.envfiles (see more).
-
Deploy the Application
- Once everything is configured, click "Deploy".
- Vercel will build and deploy your application. You can monitor the deployment process in the dashboard.
-
Post-Deployment
- After deployment, verify that the application is running correctly by visiting the provided Vercel URL.
Additional Tips
- Use Vercel's preview deployments for testing changes before going live.
- Monitor performance and logs through the Vercel dashboard.
- Set up custom domains in the Vercel settings for production use.