Files
calendar/docs/self-hosting/deployments/vercel.mdx
T
Syed Ali ShahbazandGitHub 92a48b466c chore: developer docs updates (#17112)
* remove mention of data proxy

* fix self hosting broken app link

* fix booking doc

* deploy buttons and more options

* fix capitalization
2024-10-15 22:50:54 +00:00

84 lines
3.2 KiB
Plaintext

---
title: "Vercel"
icon: "triangle"
iconType: "solid"
---
## Requirements
Currently Vercel Pro Plan is required to be able to Deploy this application with Vercel, due to limitations on the number of serverless functions on the free plan.
You need a PostgresDB database hosted somewhere. [Supabase](https://supabase.com/) offer a great free option while [Heroku](https://www.heroku.com/) offers a low-cost option.
## One Click Deployment
<a href="https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fcalcom%2Fcal.com&env=DATABASE_URL,NEXT_PUBLIC_WEBAPP_URL,NEXTAUTH_URL,NEXTAUTH_SECRET,CRON_API_KEY,CALENDSO_ENCRYPTION_KEY&envDescription=See%20all%20available%20env%20vars&envLink=https%3A%2F%2Fgithub.com%2Fcalcom%2Fcal.com%2Fblob%2Fmain%2F.env.example&project-name=cal&repo-name=cal.com&build-command=cd%20../..%20%26%26%20yarn%20build&root-directory=apps%2Fweb%2F" target="_blank">
<img src="https://vercel.com/button" noZoom alt="Deploy with Vercel" />
</a>
## Manual Deployment
### Local settings
<Steps>
<Step title="Fork and clone the repository">
```
git clone https://github.com/\<your-fork\>/cal.com.git
```
</Step>
<Step title="Set environment variables">
Copy the `.env.example` file in `apps/web`, rename it to `.env` and fill it with your settings ([See manual setup](https://github.com/calcom/cal.com#manual-setup) and [Obtaining the Google API Credentials](https://github.com/calcom/cal.com#obtaining-the-google-api-credentials))
</Step>
<Step title="Install packages with yarn">
```
yarn install
```
</Step>
<Step title="Set up the database using the Prisma schema">
Schema is located in at `packages/prisma/schema.prisma`.
```
yarn workspace @calcom/prisma db-deploy
```
</Step>
<Step title="Open [Prisma Studio](https://www.prisma.io/studio)">
To look at or modify the database content
```
yarn db-studio
```
</Step>
<Step title="Open User model">
Click on the `User` model to add a new user record.
</Step>
<Step title="Create new user">
Fill out the fields (remembering to encrypt your password with [BCrypt](https://bcrypt-generator.com/)) and click `Save 1 Record` to create your first user.
</Step>
<Step title="Login">
Open a browser to [port 3000](http://localhost:3000/) on your localhost and login with your just created, first user.
</Step>
</Steps>
<Warning>
Sometimes, yarn install might fail during deployment on Vercel, in which case, you can use ```YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn install``` as the install command instead.
</Warning>
#### Deployment
<Steps>
<Step title="Create a new project on Vercel">
</Step>
<Step title="Import from your forked repository">
</Step>
<Step title="Set the Environment Variables">
</Step>
<Step title="Set the root directory to `apps/web`">
</Step>
<Step title="Override the build command">
Override to:
```
cd ../.. && yarn build --include-dependencies --no-deps
```
</Step>
<Step title="Hit Deploy">
</Step>
</Steps>