Skip to content

Commit

Permalink
Preview PR pingcap/docs#14835 and this preview is triggered from commit
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Sep 15, 2023
1 parent ba45aed commit 629f0a4
Showing 1 changed file with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ You are expected to have an account and a cluster in TiDB Cloud. If you do not h

> **Note:**
>
> For TiDB Dedicated clusters, make sure that the traffic filter of the cluster allows all IP addresses (set to `0.0.0.0/0`) for connection, because Vercel deployments use [dynamic IP addresses](https://vercel.com/guides/how-to-allowlist-deployment-ip-address). If you use the TiDB Cloud Vercel integration, TiDB Cloud automatically adds a `0.0.0.0/0` traffic filter to your cluster in the integration workflow if there is none.
> For TiDB Dedicated clusters, make sure that the traffic filter of the cluster allows all IP addresses (set to `0.0.0.0/0`) for connection, because Vercel deployments use [dynamic IP addresses](https://vercel.com/guides/how-to-allowlist-deployment-ip-address).
To [integrate with Vercel via the TiDB Cloud Vercel Integration](#connect-via-the-tidb-cloud-vercel-integration), you are expected to be in the `Organization Owner` role of your organization or the `Project Owner` role of the target project in TiDB Cloud. For more information, see [User roles](/tidb-cloud/manage-user-access.md#user-roles).

Expand Down Expand Up @@ -109,6 +109,12 @@ The detailed steps are as follows:
```
DATABASE_URL
```

**TiDB Cloud Serverless Driver**

```
DATABASE_URL
```

> **Note:**
>
Expand Down Expand Up @@ -154,10 +160,6 @@ The detailed steps are as follows:

You can get the connection information from the connection dialog of your cluster. To open the dialog, go to the [**Clusters**](https://tidbcloud.com/console/clusters) page of your project, click the name of your target cluster to go to its overview page, and then click **Connect** in the upper-right corner.

> **Note:**
>
> For TiDB Dedicated clusters, make sure that you have set the **Allow Access from Anywhere** traffic filter in this step.

2. Go to your Vercel dashboard > Vercel project > **Settings** > **Environment Variables**, and then [declare each environment variable value](https://vercel.com/docs/concepts/projects/environment-variables#declare-an-environment-variable) according to the connection information of your TiDB cluster.

![Vercel Environment Variables](/media/tidb-cloud/vercel/integration-vercel-environment-variables.png)
Expand Down Expand Up @@ -218,6 +220,10 @@ If you have installed [TiDB Cloud Vercel integration](https://vercel.com/integra

Vercel [Preview Deployments](https://vercel.com/docs/deployments/preview-deployments) allow you to preview changes to your app in a live deployment without merging those changes to your Git project's production branch. [TiDB Serverless Branching](/tidb-cloud/branch-overview.md) allows you to create a new instance for each branch of your Vercel project. This allows you to preview changes to your app in a live deployment without affecting your production data.
> **Note:**
>
> Only [Vercel projects associated with GitHub repositories](https://vercel.com/docs/deployments/git/vercel-for-github) are supported for now.
To enable TiDB Serverless Branching, you need to:
1. Select **Cluster** as your connection type.
Expand All @@ -239,7 +245,7 @@ After you push changes to GitHub repository, Vercel will trigger a preview deplo
a. During the deployment, TiDB Cloud integration will automatically create a TiDB Serverless branch, of which the name is the same as the git branch name. If the TiDB Serverless branch already exists, TiDB Cloud integration will skip this step.
![TiDB_Cloud_Branch_Check](/media/tidb-cloud/vercel/tidb-cloud-branch-check.png)
![TiDB_Cloud_Branch_Check](/media/tidb-cloud/vercel/tidbcloud-branch-check.png)
b. After the TiDB Serverless branch is ready, TiDB Cloud integration will set environment variables in the preview deployment for the Vercel project.
Expand Down

0 comments on commit 629f0a4

Please sign in to comment.