Skip to content

Commit

Permalink
📝 docs: deploy lobechat database on zeabur (lobehub#3429)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelYuhe authored Aug 8, 2024
1 parent a77456a commit e606a74
Show file tree
Hide file tree
Showing 2 changed files with 104 additions and 2 deletions.
52 changes: 51 additions & 1 deletion docs/self-hosting/server-database/zeabur.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,55 @@ tags:

# Deploying LobeChat Database on Zeabur

TODO
<Callout type="info">
This article assumes that you are familiar with the basic principles and processes of deploying the LobeChat server database version, so it only includes content related to core environment variable configuration. If you are not familiar with the deployment principles of the LobeChat server database version, please refer to [Deploying Server Database](/en/docs/self-hosting/server-database) first.
</Callout>

If you want to deploy LobeChat Database on Zeabur, you can follow the steps below:

## Create an Auth0 Account for Authentication

The [template for LobeChat Database on Zeabur](https://zeabur.com/templates/RRSPSD) uses NextAuth and Auth0 as auth provider, so you need to create an Auth0 account to get the required credentials.

You can refer to the [Auth0 documentation](/en/docs/self-hosting/advanced/auth/next-auth/auth0) to a detailed guide on how to create an Auth0 account and get those credentials.

## Deploying on Zeabur

Here is the process for deploying the LobeChat server database version on Zeabur:

<Steps>

### Go to the template page on Zeabur

Go to the [LobeChat Database template page](https://zeabur.com/templates/RRSPSD) on Zeabur and click on the "Deploy" button.

### Fill in the required environment variables

After you click on the "Deploy" button, you will see a modal pop-up where you can fill in the required environment variables.

Here are the environment variables you need to fill in:

- OpenAI API key: Your OpenAI API key to get responses from OpenAI.
- Auth0 Client ID: Your Auth0 client ID.
- Auth0 Client Secret: Your Auth0 client secret.
- Auth0 Domain: Your Auth0 domain(without https:// prefix).
- LobeChat Domain: A free subdomain with `.zeabur.app` suffix.
- MinIO Public Domain: A free subdomain with `.zeabur.app` suffix for yout MinIO web port to enable public access for the uploaded files.

### Select a region and deploy

After you fill all the required environment variables, select a region where you want to deploy your LobeChat Database and click on the "Deploy" button.

You will see another modal pop-up where you can see the deployment progress.

### Access your LobeChat Database

Once the deployment is done, you will be navigated automatically to your project just created on Zeabur Dashboard.

You can see three services running: `LobeChat-Database`, `MinIO`, and `PostgreSQL`.

Press on the `LobeChat-Database` and you can see the public domain you just created, click on it to access your LobeChat Database.

You can also bind a custom domain for your services if you want, here is a guide on how to [bind a custom domain on Zeabur](https://zeabur.com/docs/deploy/domain-binding).

</Steps>
54 changes: 53 additions & 1 deletion docs/self-hosting/server-database/zeabur.zh-CN.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,56 @@ tags:

# 使用 Zeabur 部署 LobeChat 数据库版

TODO
<Callout type="info">
本文假设你已经熟悉 LobeChat 服务器数据库版的部署基本原理和流程,因此只包含与核心环境变量配置相关的内容。如果你对 LobeChat 服务器数据库版的部署原理不熟悉,请先参考[部署服务器数据库](/en/docs/self-hosting/server-database)
</Callout>

如果你想在 Zeabur 上部署 LobeChat 数据库版,可以按照以下步骤操作:

## Create an Auth0 Account for Authentication
## 创建 Auth0 账户以进行身份验证

[在 Zeabur 上的 LobeChat 数据库模板](https://zeabur.com/templates/RRSPSD) 使用 NextAuth 和 Auth0 作为身份验证提供者,因此你需要创建一个 Auth0 账户以获取所需的凭证。

你可以参考[Auth0 文档](/en/docs/self-hosting/advanced/auth/next-auth/auth0)获取关于如何创建 Auth0 账户和获取凭证的详细指南。

## 在 Zeabur 上部署

这里是在 Zeabur 上部署 LobeChat 服务器数据库版的流程:

<Steps>

### 前往 Zeabur 上的模板页面

前往 [Zeabur 上的 LobeChat 数据库模板页面](https://zeabur.com/templates/RRSPSD) 并点击 "Deploy" 按钮。

### 填写必要的环境变量

在你点击“部署“按钮后,你会看到一个模态弹窗,你可以在这里填写必要的环境变量。

以下是你需要填写的环境变量:

- OpenAI API key: 你的 OpenAI API key 用于获取模型的访问权限。
- Auth0 Client ID: 你的 Auth0 客户端 ID 。
- Auth0 Client Secret: 你的 Auth0 客户端 secret 。
- Auth0 Domain: 你的 Auth0 域名(不需要 https:// 前缀) 。
- LobeChat Domain: 一个免费的 `.zeabur.app` 后缀的域名。
- MinIO Public Domain: 一个免费的 `.zeabur.app` 后缀的域名为了暴露 MinIO 服务以公开访问资源。

### 选择一个区域并部署

在你填写完所有必要的环境变量后,选择一个你想要部署 LobeChat 数据库的区域并点击“部署”按钮。

你会看到另一个模态弹窗,你可以在这里看到部署的进度。

### 访问你的 LobeChat 数据库版本

当部署完成后,你会被自动导航到你在 Zeabur 控制台上刚刚创建的项目。

你会看到三个服务正在运行:`LobeChat-Database``MinIO``PostgreSQL`

按下 `LobeChat-Database` 你会看到你刚刚创建的公共域名,点击它以访问你的 LobeChat 数据库。

你可以选择绑定一个自定义域名,这里有一个关于如何在 Zeabur 上[绑定自定义域名](https://zeabur.com/docs/deploy/domain-binding)的指南。

</Steps>

0 comments on commit e606a74

Please sign in to comment.