From 0e3bf0ce22df01ad4d0dc22fb17ba8dcca27dd1f Mon Sep 17 00:00:00 2001 From: Arvin Xu Date: Sat, 24 Aug 2024 01:40:33 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20docs:=20improve=20vercel=20and?= =?UTF-8?q?=20sync=20(#3581)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 📝 docs: improve docs of vercel deployment * 📝 docs: improve docs * Update `upstream-sync.mdx` to include detailed instructions for handling sync failures and manual updates * Add instructions for manually clicking "Update Branch" in case of sync failures * Include images to illustrate the process of handling sync failures and manually updating branches --- docs/self-hosting/advanced/upstream-sync.mdx | 12 ++++++++++++ docs/self-hosting/advanced/upstream-sync.zh-CN.mdx | 12 ++++++++++++ docs/self-hosting/server-database/vercel.mdx | 6 ++++++ docs/self-hosting/server-database/vercel.zh-CN.mdx | 6 ++++++ 4 files changed, 36 insertions(+) diff --git a/docs/self-hosting/advanced/upstream-sync.mdx b/docs/self-hosting/advanced/upstream-sync.mdx index 5324ea0eb909..ad357e448659 100644 --- a/docs/self-hosting/advanced/upstream-sync.mdx +++ b/docs/self-hosting/advanced/upstream-sync.mdx @@ -40,6 +40,18 @@ After forking the project, due to Github's limitations, you need to manually ena src="https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/266985177-7677b4ce-c348-4145-9f60-829d448d5be6.png" /> +If you encounter a sync failure, you need to manually click "Update Branch" once. + +GitHub Action Sync Failure + +Manually Sync 'Update Branch' + ## `B` Docker Deployment Upgrading the Docker deployment version is very simple, you just need to redeploy the latest LobeChat image. Here are the commands required to perform these steps: diff --git a/docs/self-hosting/advanced/upstream-sync.zh-CN.mdx b/docs/self-hosting/advanced/upstream-sync.zh-CN.mdx index eab56be998a7..17395ba28943 100644 --- a/docs/self-hosting/advanced/upstream-sync.zh-CN.mdx +++ b/docs/self-hosting/advanced/upstream-sync.zh-CN.mdx @@ -35,6 +35,18 @@ tags: src="https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/266985177-7677b4ce-c348-4145-9f60-829d448d5be6.png" /> +如果你遇到了同步失败的情况,你需要手动重新点一次 「Update Branch」。 + +GitHub Action 同步失败 + +手动同步 「Update Branch」 + ## `B` Docker 部署 Docker 部署版本的升级非常简单,只需要重新部署 LobeChat 的最新镜像即可。 以下是执行这些步骤所需的指令: diff --git a/docs/self-hosting/server-database/vercel.mdx b/docs/self-hosting/server-database/vercel.mdx index 9226b19cb413..4861d9791c3f 100644 --- a/docs/self-hosting/server-database/vercel.mdx +++ b/docs/self-hosting/server-database/vercel.mdx @@ -109,6 +109,10 @@ KEY_VAULTS_SECRET=jgwsK28dspyVQoIf8/M3IIHl1h6LYYceSYNXeLpy6uk= Make sure to add this to the Vercel environment variables as well. +### Add the `APP_URL` Environment Variable + +Finally, you need to add the `APP_URL` environment variable, which specifies the URL address of the LobeChat application. + ## 2. Configure Authentication Service @@ -394,6 +398,8 @@ src={'https://github.com/lobehub/lobe-chat/assets/28616219/9cb5150d-6e1e-4c59-9a For easy copying, here is a summary of the environment variables required to configure the server-side database: ```shell +APP_URL=https://your-project.com + # Specify the service mode as server NEXT_PUBLIC_SERVICE_MODE=server diff --git a/docs/self-hosting/server-database/vercel.zh-CN.mdx b/docs/self-hosting/server-database/vercel.zh-CN.mdx index ca636b06f237..1586530dc27f 100644 --- a/docs/self-hosting/server-database/vercel.zh-CN.mdx +++ b/docs/self-hosting/server-database/vercel.zh-CN.mdx @@ -102,6 +102,10 @@ KEY_VAULTS_SECRET=jgwsK28dspyVQoIf8/M3IIHl1h6LYYceSYNXeLpy6uk= 同样需要将其添加到 Vercel 环境变量中。 +### 添加 `APP_URL` 环境变量 + +该部分最后需要添加 APP_URL 环境变量,用于指定LobeChat 应用的 URL 地址。 + ## 二、 配置身份验证服务 @@ -375,6 +379,8 @@ S3_PUBLIC_DOMAIN=https://s3-dev.your-domain.com 为方便一键复制,在此汇总配置服务端数据库所需要的环境变量: ```shell +APP_URL=https://your-project.com + # 指定服务模式为 server NEXT_PUBLIC_SERVICE_MODE=server