mirror of
https://github.com/lobehub/lobe-chat.git
synced 2026-06-13 19:20:04 +00:00
📝 docs: add more deployment documents (#1393)
* 📝 docs: Creating self-hosting documents repocloud.mdx (#1388) * Creating self-hosting documents repocloud.mdx Adding deployment documentation for RepoCloud as requested :) * Update repocloud.mdx Modifying with svg instead of png as requested * 📝 docs: create repocloud.zn-CN.mdx (#1389) * Create repocloud.zn-CN.mdx * Update repocloud.zn-CN.mdx Changing png to svg * 📝 docs: update docs * 📝 docs: add netlify deployment * 🔧 chore: add netlify.toml config * ✨ docs: update platform deployment * ✨ docs: update readme --------- Co-authored-by: cosark <121065588+cosark@users.noreply.github.com>
This commit is contained in:
@@ -27,6 +27,7 @@ module.exports = defineConfig({
|
||||
experimental: {
|
||||
jsonMode: true,
|
||||
},
|
||||
reference: '你需要保持 mdx 的组件格式,输出文本不需要在最外层包裹任何代码块语法',
|
||||
markdown: {
|
||||
entry: ['./README.zh-CN.md', './docs/**/*.zh-CN.md', './docs/**/*.zh-CN.mdx'],
|
||||
entryLocale: 'zh-CN',
|
||||
|
||||
+3
-3
@@ -468,9 +468,9 @@ API Key 是使用 LobeChat 进行大语言模型会话的必要信息,本节
|
||||
这可以有效降低获取 OpenAI API Key 的门槛。但与此同时,一旦使用三方服务,你可能也需要承担潜在的风险,
|
||||
请根据你自己的实际情况自行决策。以下是常见的第三方模型代理商列表,供你参考:
|
||||
|
||||
| | 服务商 | 特性说明 | Proxy 代理地址 | 链接 |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | --------------------------------------------------------- | ------------------------- | ------------------------------- |
|
||||
| <img src="https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/296272721-c3ac0bf3-e433-4496-89c4-ebdc20689c17.jpg" width="48" /> | **AiHubMix** | 使用 OpenAI 企业接口,全站模型价格为官方一半(含 GPT-4 ) | `https://aihubmix.com/v1` | [获取](https://lobe.li/XHnZIUP) |
|
||||
| | 服务商 | 特性说明 | Proxy 代理地址 | 链接 |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ |-------------------------------------------| ------------------------- | ------------------------------- |
|
||||
| <img src="https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/296272721-c3ac0bf3-e433-4496-89c4-ebdc20689c17.jpg" width="48" /> | **AiHubMix** | 使用 OpenAI 企业接口,全站模型价格为官方 **6折**(含 GPT-4 ) | `https://aihubmix.com/v1` | [获取](https://lobe.li/XHnZIUP) |
|
||||
|
||||
> \[!WARNING]
|
||||
>
|
||||
|
||||
+28
-20
@@ -14,57 +14,65 @@ LobeChat is an open-source, extensible ([Function Calling][fc-url]), high-perfor
|
||||
|
||||

|
||||
|
||||
<!-- DOCS LIST -->
|
||||
<!-- DOCS LIST -->
|
||||
|
||||
### 🤯 Basic
|
||||
|
||||
- [Architecture Design](https://github.com/lobehub/lobe-chat/wiki/Architecture) | [架构设计](https://github.com/lobehub/lobe-chat/wiki/Architecture.zh-CN)
|
||||
- [Code Style and Contribution Guidelines](https://github.com/lobehub/lobe-chat/wiki/Contributing-Guidelines) | [代码风格与贡献指南](https://github.com/lobehub/lobe-chat/wiki/Contributing-Guidelines.zh-CN)
|
||||
- [Complete Guide to LobeChat Feature Development](https://github.com/lobehub/lobe-chat/wiki/Feature-Development) | [LobeChat 功能开发完全指南](https://github.com/lobehub/lobe-chat/wiki/Feature-Development.zh-CN)
|
||||
- [Conversation API Implementation Logic](https://github.com/lobehub/lobe-chat/wiki/Chat-API) | [会话 API 实现逻辑](https://github.com/lobehub/lobe-chat/wiki/Chat-API.zh-CN)
|
||||
- [Directory Structure](https://github.com/lobehub/lobe-chat/wiki/Folder-Structure) | [目录架构](https://github.com/lobehub/lobe-chat/wiki/Folder-Structure.zh-CN)
|
||||
- [Environment Setup Guide](https://github.com/lobehub/lobe-chat/wiki/Setup-Development) | [环境设置指南](https://github.com/lobehub/lobe-chat/wiki/Setup-Development.zh-CN)
|
||||
- [How to Develop a New Feature](https://github.com/lobehub/lobe-chat/wiki/Feature-Development-Frontend) | [如何开发一个新功能:前端实现](https://github.com/lobehub/lobe-chat/wiki/Feature-Development-Frontend.zh-CN)
|
||||
- [New Authentication Provider Guide](https://github.com/lobehub/lobe-chat/wiki/Add-New-Authentication-Providers) | [新身份验证方式开发指南](https://github.com/lobehub/lobe-chat/wiki/Add-New-Authentication-Providers.zh-CN)
|
||||
- [Resources and References](https://github.com/lobehub/lobe-chat/wiki/Resources) | [资源与参考](https://github.com/lobehub/lobe-chat/wiki/Resources.zh-CN)
|
||||
- [Technical Development Getting Started Guide](https://github.com/lobehub/lobe-chat/wiki/Intro) | [技术开发上手指南](https://github.com/lobehub/lobe-chat/wiki/Intro.zh-CN)
|
||||
- [Testing Guide](https://github.com/lobehub/lobe-chat/wiki/Test) | [测试指南](https://github.com/lobehub/lobe-chat/wiki/Test.zh-CN)
|
||||
- [Architecture Design](https://github.com/lobehub/lobe-chat/wiki/Architecture) | [架构设计](https://github.com/lobehub/lobe-chat/wiki/Architecture.zh-CN)
|
||||
- [Code Style and Contribution Guidelines](https://github.com/lobehub/lobe-chat/wiki/Contributing-Guidelines) | [代码风格与贡献指南](https://github.com/lobehub/lobe-chat/wiki/Contributing-Guidelines.zh-CN)
|
||||
- [Complete Guide to LobeChat Feature Development](https://github.com/lobehub/lobe-chat/wiki/Feature-Development) | [LobeChat 功能开发完全指南](https://github.com/lobehub/lobe-chat/wiki/Feature-Development.zh-CN)
|
||||
- [Conversation API Implementation Logic](https://github.com/lobehub/lobe-chat/wiki/Chat-API) | [会话 API 实现逻辑](https://github.com/lobehub/lobe-chat/wiki/Chat-API.zh-CN)
|
||||
- [Directory Structure](https://github.com/lobehub/lobe-chat/wiki/Folder-Structure) | [目录架构](https://github.com/lobehub/lobe-chat/wiki/Folder-Structure.zh-CN)
|
||||
- [Environment Setup Guide](https://github.com/lobehub/lobe-chat/wiki/Setup-Development) | [环境设置指南](https://github.com/lobehub/lobe-chat/wiki/Setup-Development.zh-CN)
|
||||
- [How to Develop a New Feature](https://github.com/lobehub/lobe-chat/wiki/Feature-Development-Frontend) | [如何开发一个新功能:前端实现](https://github.com/lobehub/lobe-chat/wiki/Feature-Development-Frontend.zh-CN)
|
||||
- [New Authentication Provider Guide](https://github.com/lobehub/lobe-chat/wiki/Add-New-Authentication-Providers) | [新身份验证方式开发指南](https://github.com/lobehub/lobe-chat/wiki/Add-New-Authentication-Providers.zh-CN)
|
||||
- [Resources and References](https://github.com/lobehub/lobe-chat/wiki/Resources) | [资源与参考](https://github.com/lobehub/lobe-chat/wiki/Resources.zh-CN)
|
||||
- [Technical Development Getting Started Guide](https://github.com/lobehub/lobe-chat/wiki/Intro) | [技术开发上手指南](https://github.com/lobehub/lobe-chat/wiki/Intro.zh-CN)
|
||||
- [Testing Guide](https://github.com/lobehub/lobe-chat/wiki/Test) | [测试指南](https://github.com/lobehub/lobe-chat/wiki/Test.zh-CN)
|
||||
|
||||
|
||||
<br/>
|
||||
|
||||
### 🌎 Internationalization
|
||||
|
||||
- [Internationalization Implementation Guide](https://github.com/lobehub/lobe-chat/wiki/Internationalization-Implementation) | [国际化实现指南](https://github.com/lobehub/lobe-chat/wiki/Internationalization-Implementation.zh-CN)
|
||||
- [New Locale Guide](https://github.com/lobehub/lobe-chat/wiki/Add-New-Locale) | [新语种添加指南](https://github.com/lobehub/lobe-chat/wiki/Add-New-Locale.zh-CN)
|
||||
- [Internationalization Implementation Guide](https://github.com/lobehub/lobe-chat/wiki/Internationalization-Implementation) | [国际化实现指南](https://github.com/lobehub/lobe-chat/wiki/Internationalization-Implementation.zh-CN)
|
||||
- [New Locale Guide](https://github.com/lobehub/lobe-chat/wiki/Add-New-Locale) | [新语种添加指南](https://github.com/lobehub/lobe-chat/wiki/Add-New-Locale.zh-CN)
|
||||
|
||||
|
||||
<br/>
|
||||
|
||||
### ⌨️ State Management
|
||||
|
||||
- [Best Practices for State Management](https://github.com/lobehub/lobe-chat/wiki/State-Management-Intro) | [状态管理最佳实践](https://github.com/lobehub/lobe-chat/wiki/State-Management-Intro.zh-CN)
|
||||
- [Data Store Selector](https://github.com/lobehub/lobe-chat/wiki/State-Management-Selectors) | [数据存储取数模块](https://github.com/lobehub/lobe-chat/wiki/State-Management-Selectors.zh-CN)
|
||||
- [Best Practices for State Management](https://github.com/lobehub/lobe-chat/wiki/State-Management-Intro) | [状态管理最佳实践](https://github.com/lobehub/lobe-chat/wiki/State-Management-Intro.zh-CN)
|
||||
- [Data Store Selector](https://github.com/lobehub/lobe-chat/wiki/State-Management-Selectors) | [数据存储取数模块](https://github.com/lobehub/lobe-chat/wiki/State-Management-Selectors.zh-CN)
|
||||
|
||||
|
||||
<br/>
|
||||
|
||||
### 🤖 Agents
|
||||
|
||||
- [Agent Index and Submit](https://github.com/lobehub/lobe-chat-agents) | [助手索引与提交](https://github.com/lobehub/lobe-chat-agents/blob/main/README.zh-CN.md)
|
||||
- [Agent Index and Submit](https://github.com/lobehub/lobe-chat-agents) | [助手索引与提交](https://github.com/lobehub/lobe-chat-agents/blob/main/README.zh-CN.md)
|
||||
|
||||
|
||||
<br/>
|
||||
|
||||
### 🧩 Plugins
|
||||
|
||||
- [Plugin Index and Submit](https://github.com/lobehub/lobe-chat-plugins) | [插件索引与提交](https://github.com/lobehub/lobe-chat-plugins/blob/main/README.zh-CN.md)
|
||||
- [Plugin SDK Docs](https://chat-plugin-sdk.lobehub.com) | [插件 SDK 文档](https://chat-plugin-sdk.lobehub.com)
|
||||
- [Plugin Index and Submit](https://github.com/lobehub/lobe-chat-plugins) | [插件索引与提交](https://github.com/lobehub/lobe-chat-plugins/blob/main/README.zh-CN.md)
|
||||
- [Plugin SDK Docs](https://chat-plugin-sdk.lobehub.com) | [插件 SDK 文档](https://chat-plugin-sdk.lobehub.com)
|
||||
|
||||
|
||||
<br/>
|
||||
|
||||
### 📊 Others
|
||||
|
||||
- [Lighthouse Reports](https://github.com/lobehub/lobe-chat/wiki/Lighthouse) | [Lighthouse 测试报告](https://github.com/lobehub/lobe-chat/wiki/Lighthouse.zh-CN)
|
||||
- [Lighthouse Reports](https://github.com/lobehub/lobe-chat/wiki/Lighthouse) | [Lighthouse 测试报告](https://github.com/lobehub/lobe-chat/wiki/Lighthouse.zh-CN)
|
||||
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
|
||||
<!-- DOCS LIST -->
|
||||
|
||||
---
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
- [TOC](Home.md) | [目录](Home.md)
|
||||
|
||||
<!-- DOCS LIST -->
|
||||
<!-- DOCS LIST -->
|
||||
|
||||
#### 🤯 Basic
|
||||
|
||||
@@ -20,29 +20,37 @@
|
||||
- [Technical Development Getting Started Guide](https://github.com/lobehub/lobe-chat/wiki/Intro) | [技术开发上手指南](https://github.com/lobehub/lobe-chat/wiki/Intro.zh-CN)
|
||||
- [Testing Guide](https://github.com/lobehub/lobe-chat/wiki/Test) | [测试指南](https://github.com/lobehub/lobe-chat/wiki/Test.zh-CN)
|
||||
|
||||
|
||||
#### 🌎 Internationalization
|
||||
|
||||
- [Internationalization Implementation Guide](https://github.com/lobehub/lobe-chat/wiki/Internationalization-Implementation) | [国际化实现指南](https://github.com/lobehub/lobe-chat/wiki/Internationalization-Implementation.zh-CN)
|
||||
- [New Locale Guide](https://github.com/lobehub/lobe-chat/wiki/Add-New-Locale) | [新语种添加指南](https://github.com/lobehub/lobe-chat/wiki/Add-New-Locale.zh-CN)
|
||||
|
||||
|
||||
#### ⌨️ State Management
|
||||
|
||||
- [Best Practices for State Management](https://github.com/lobehub/lobe-chat/wiki/State-Management-Intro) | [状态管理最佳实践](https://github.com/lobehub/lobe-chat/wiki/State-Management-Intro.zh-CN)
|
||||
- [Data Store Selector](https://github.com/lobehub/lobe-chat/wiki/State-Management-Selectors) | [数据存储取数模块](https://github.com/lobehub/lobe-chat/wiki/State-Management-Selectors.zh-CN)
|
||||
|
||||
|
||||
#### 🤖 Agents
|
||||
|
||||
- [Agent Index and Submit](https://github.com/lobehub/lobe-chat-agents) | [助手索引与提交](https://github.com/lobehub/lobe-chat-agents/blob/main/README.zh-CN.md)
|
||||
|
||||
|
||||
#### 🧩 Plugins
|
||||
|
||||
- [Plugin Index and Submit](https://github.com/lobehub/lobe-chat-plugins) | [插件索引与提交](https://github.com/lobehub/lobe-chat-plugins/blob/main/README.zh-CN.md)
|
||||
- [Plugin SDK Docs](https://chat-plugin-sdk.lobehub.com) | [插件 SDK 文档](https://chat-plugin-sdk.lobehub.com)
|
||||
|
||||
|
||||
#### 📊 Others
|
||||
|
||||
- [Lighthouse Reports](https://github.com/lobehub/lobe-chat/wiki/Lighthouse) | [Lighthouse 测试报告](https://github.com/lobehub/lobe-chat/wiki/Lighthouse.zh-CN)
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- DOCS LIST -->
|
||||
|
||||
<!-- LINK GROUP -->
|
||||
|
||||
@@ -53,7 +53,9 @@ $ docker run -d -p 3210:3210 \
|
||||
- 默认映射端口为 `3210`, 请确保未被占用或手动更改端口映射
|
||||
- 使用你的 OpenAI API Key 替换上述命令中的 `sk-xxxx`
|
||||
|
||||
- LobeChat 支持的完整环境变量列表请参考 [环境变量](/zh/self-hosting/environment-ariable) 部分
|
||||
<Callout type={'info'}>
|
||||
LobeChat 支持的完整环境变量列表请参考 [📘 环境变量](/zh/self-hosting/environment-variables) 部分
|
||||
</Callout>
|
||||
|
||||
<Callout>
|
||||
由于官方的 Docker
|
||||
|
||||
@@ -0,0 +1,170 @@
|
||||
import { Callout, Steps } from 'nextra/components';
|
||||
|
||||
# Deploy LobeChat with Netlify
|
||||
|
||||
If you want to deploy LobeChat on Netlify, you can follow these steps:
|
||||
|
||||
## Deploy LobeChat with Netlify
|
||||
|
||||
<Steps>
|
||||
|
||||
### Fork the LobeChat Repository
|
||||
|
||||
Click the Fork button to fork the LobeChat repository to your GitHub account.
|
||||
|
||||
### Prepare your OpenAI API Key
|
||||
|
||||
Go to [OpenAI API Key](https://platform.openai.com/account/api-keys) to obtain your OpenAI API Key.
|
||||
|
||||
### Import to Netlify Workspace
|
||||
|
||||
<Callout>
|
||||
After testing, it is currently not supported to have a one-click deployment button similar to
|
||||
Vercel/Zeabur. The reason is unknown. Therefore, manual import is required.
|
||||
</Callout>
|
||||
|
||||
Click "Import from git"
|
||||
|
||||
<Image
|
||||
alt={'Click "Import from git" in the Netlify workspace'}
|
||||
src={'https://github.com/lobehub/lobe-chat/assets/28616219/31b999e5-2a74-45fc-935b-f036e72a684d'}
|
||||
bordered
|
||||
inStep
|
||||
height={362}
|
||||
/>
|
||||
|
||||
Then click "Deploy with Github" and authorize Netlify to access your GitHub account.
|
||||
|
||||
<Image
|
||||
alt={'Authorize Netlify to access your GitHub account'}
|
||||
src={'https://github.com/lobehub/lobe-chat/assets/28616219/c9c58141-5ec6-43f1-8d97-0a84a04dcdba'}
|
||||
bordered
|
||||
inStep
|
||||
height={273}
|
||||
/>
|
||||
|
||||
Next, select the LobeChat project:
|
||||
|
||||
<Image
|
||||
alt={'Select the LobeChat github project'}
|
||||
src={'https://github.com/lobehub/lobe-chat/assets/28616219/6c3968a8-fbbb-4268-a587-edaced2d96af'}
|
||||
bordered
|
||||
inStep
|
||||
height={228}
|
||||
/>
|
||||
|
||||
### Configure Site Name and Environment Variables
|
||||
|
||||
In this step, you need to configure your site, including the site name, build command, and publish directory. Fill in your site name in the "Site Name" field. If there are no special requirements, you do not need to modify the remaining configurations as we have already set the default configurations.
|
||||
|
||||
<Image
|
||||
alt={'Configure LobeChat site name'}
|
||||
src={'https://github.com/lobehub/lobe-chat/assets/28616219/f3885537-6d43-422f-b1b8-e70732401025'}
|
||||
bordered
|
||||
inStep
|
||||
height={712}
|
||||
/>
|
||||
|
||||
Click the "Add environment variables" button to add site environment variables:
|
||||
|
||||
<Image
|
||||
alt={'Add LobeChat site environment variables'}
|
||||
src={'https://github.com/lobehub/lobe-chat/assets/28616219/3b607482-4d99-455a-bc10-3090dd4fe3c5'}
|
||||
bordered
|
||||
inStep
|
||||
height={537}
|
||||
/>
|
||||
|
||||
Taking OpenAI as an example, the environment variables you need to add are as follows:
|
||||
|
||||
| Environment Variable | Type | Description | Example |
|
||||
| --- | --- | --- | --- |
|
||||
| `OPENAI_API_KEY` | Required | This is the API key you applied for on the OpenAI account page | `sk-xxxxxx...xxxxxx` |
|
||||
| `ACCESS_CODE` | Required | Add a password to access this service. You can set a long password to prevent brute force attacks. When this value is separated by commas, it becomes an array of passwords | `awCT74` or `e3@09!` or `code1,code2,code3` |
|
||||
| `OPENAI_PROXY_URL` | Optional | If you manually configure the OpenAI interface proxy, you can use this configuration to override the default OpenAI API request base URL | `https://aihubmix.com/v1`, default value: `https://api.openai.com/v1` |
|
||||
|
||||
<Callout type={'info'}>
|
||||
For a complete list of environment variables supported by LobeChat, please refer to the [📘
|
||||
Environment Variables](/en/self-hosting/environment-variables)
|
||||
</Callout>
|
||||
|
||||
Afteradding the variables, finally click "Deploy lobe-chat" to enter the deployment phase
|
||||
|
||||
<Image
|
||||
alt={'Environment variables added'}
|
||||
src={'https://github.com/lobehub/lobe-chat/assets/28616219/c9f74ec4-ce63-4ce9-b9e2-34bda6fda10b'}
|
||||
bordered
|
||||
inStep
|
||||
height={600}
|
||||
/>
|
||||
|
||||
### Wait for Deployment to Complete
|
||||
|
||||
After clicking deploy, you will enter the site details page, where you can click the "Deploying your site" in blue or the "Building" in yellow to view the deployment progress.
|
||||
|
||||
<Image
|
||||
alt={'Netlify site details page'}
|
||||
src={'https://github.com/lobehub/lobe-chat/assets/28616219/a7fd85d5-fd32-4756-814e-ff7ab7567fe1'}
|
||||
bordered
|
||||
inStep
|
||||
height={396}
|
||||
/>
|
||||
|
||||
Upon entering the deployment details, you will see the following interface, indicating that your LobeChat is currently being deployed. Simply wait for the deployment to complete.
|
||||
|
||||
<Image
|
||||
alt={'LobeChat deployment in progress'}
|
||||
src={'https://github.com/lobehub/lobe-chat/assets/28616219/1ed8b13d-046e-47c8-bd61-116ffdf5d01b'}
|
||||
bordered
|
||||
inStep
|
||||
height={325}
|
||||
/>
|
||||
|
||||
During the deployment and build process:
|
||||
|
||||
<Image
|
||||
alt={'Deployment in progress'}
|
||||
src={'https://github.com/lobehub/lobe-chat/assets/28616219/1c82d707-cb6f-4924-b246-a5235a919864'}
|
||||
bordered
|
||||
inStep
|
||||
height={558}
|
||||
/>
|
||||
|
||||
### Deployment Successful, Start Using
|
||||
|
||||
If your Deploy Log in the interface looks like the following, it means your LobeChat has been successfully deployed.
|
||||
|
||||
<Image
|
||||
alt={'Deployment Successful'}
|
||||
src={'https://github.com/lobehub/lobe-chat/assets/28616219/c1f945d1-f3e2-4100-b6bb-24d4cb13c438'}
|
||||
bordered
|
||||
inStep
|
||||
height={558}
|
||||
/>
|
||||
At this point, you can click on "Open production deploy" to access your LobeChat site.
|
||||
|
||||
<Image
|
||||
alt={'Access Your LobeChat Site'}
|
||||
src={'https://github.com/lobehub/lobe-chat/assets/28616219/b04723eb-64ad-4028-a901-dc4e4ee2d0c1'}
|
||||
bordered
|
||||
inStep
|
||||
height={527}
|
||||
/>
|
||||
|
||||
</Steps>
|
||||
|
||||
## Set up Custom Domain (Optional)
|
||||
|
||||
You can use the subdomain provided by Netlify, or choose to bind a custom domain. Currently, the domain provided by Netlify has not been contaminated, and can be accessed directly in most regions.
|
||||
|
||||
[//]: # '[![][deploy-button-image]][deploy-link]'
|
||||
[//]: # '[deploy-button-image]: https://www.netlify.com/img/deploy/button.svg'
|
||||
[//]: # '[deploy-link]: https://app.netlify.com/start/deploy?repository=https://github.com/lobehub/lobe-chat'
|
||||
[//]: # '### 授权 Netlify 访问你的 GitHub 账号'
|
||||
[//]: # '点击 「Connect to GitHub」,授权 Netlify 访问你的 GitHub 账号:'
|
||||
[//]: # 'Image'
|
||||
[//]: # 'github.com/lobehub/lobe-chat/assets/28616219/8ee533d5-f7e9-4523-991b-2c23a72c1530'
|
||||
[//]: # ' bordered'
|
||||
[//]: # ' width={790}'
|
||||
[//]: # ' height={556}'
|
||||
[//]: # '/>'
|
||||
@@ -0,0 +1,166 @@
|
||||
import { Callout, Steps } from 'nextra/components';
|
||||
|
||||
# 使用 Netlify 部署
|
||||
|
||||
如果想在 Netlify 上部署 LobeChat,可以按照以下步骤进行操作:
|
||||
|
||||
## Netlify 部署 LobeChat
|
||||
|
||||
<Steps>
|
||||
|
||||
### Fork LobeChat 仓库
|
||||
|
||||
点击 Fork 按钮,将 LobeChat 仓库 Fork 到你的 GitHub 账号下。
|
||||
|
||||
### 准备好你的 OpenAI API Key
|
||||
|
||||
前往 [OpenAI API Key](https://platform.openai.com/account/api-keys) 获取你的 OpenAI API Key
|
||||
|
||||
### 在 Netflix 工作台导入
|
||||
|
||||
<Callout>经过测试,暂不支持类似 Vercel/Zeabur 的一键部署按钮,原因未知。因此需要手动导入</Callout>
|
||||
|
||||
点击 「Import from git」
|
||||
|
||||
<Image
|
||||
alt={'在 Netflix 工作台点击 「Import from git」'}
|
||||
src={'https://github.com/lobehub/lobe-chat/assets/28616219/31b999e5-2a74-45fc-935b-f036e72a684d'}
|
||||
bordered
|
||||
inStep
|
||||
height={362}
|
||||
/>
|
||||
|
||||
然后点击 「Deploy with Github」,并授权 Netlify 访问你的 GitHub 账号
|
||||
|
||||
<Image
|
||||
alt={'授权 Netlify 访问你的 GitHub 账号'}
|
||||
src={'https://github.com/lobehub/lobe-chat/assets/28616219/c9c58141-5ec6-43f1-8d97-0a84a04dcdba'}
|
||||
bordered
|
||||
inStep
|
||||
height={273}
|
||||
/>
|
||||
|
||||
[//]: # '[![][deploy-button-image]][deploy-link]'
|
||||
[//]: # '[deploy-button-image]: https://www.netlify.com/img/deploy/button.svg'
|
||||
[//]: # '[deploy-link]: https://app.netlify.com/start/deploy?repository=https://github.com/lobehub/lobe-chat'
|
||||
[//]: # '### 授权 Netlify 访问你的 GitHub 账号'
|
||||
[//]: # '点击 「Connect to GitHub」,授权 Netlify 访问你的 GitHub 账号:'
|
||||
[//]: # 'Image'
|
||||
[//]: # 'github.com/lobehub/lobe-chat/assets/28616219/8ee533d5-f7e9-4523-991b-2c23a72c1530'
|
||||
[//]: # ' bordered'
|
||||
[//]: # ' width={790}'
|
||||
[//]: # ' height={556}'
|
||||
[//]: # '/>'
|
||||
|
||||
然后选择 LobeChat 项目:
|
||||
|
||||
<Image
|
||||
alt={'选择 LobeChat github 项目'}
|
||||
src={'https://github.com/lobehub/lobe-chat/assets/28616219/6c3968a8-fbbb-4268-a587-edaced2d96af'}
|
||||
bordered
|
||||
inStep
|
||||
height={228}
|
||||
/>
|
||||
|
||||
### 配置站点名称与环境变量
|
||||
|
||||
在这一步,你需要配置你的站点,包括站点名称、构建命令、发布目录等。在「Site Name」字段填写上你的站点名称。其余配置如果没有特殊要求,无需修改,我们已经设定好了默认配置。
|
||||
|
||||
<Image
|
||||
alt={'配置 LobeChat 站点名称'}
|
||||
src={'https://github.com/lobehub/lobe-chat/assets/28616219/f3885537-6d43-422f-b1b8-e70732401025'}
|
||||
bordered
|
||||
inStep
|
||||
height={712}
|
||||
/>
|
||||
|
||||
点击 「Add environment variables」按钮,添加站点环境变量:
|
||||
|
||||
<Image
|
||||
alt={'添加 LobeChat 站点环境变量'}
|
||||
src={'https://github.com/lobehub/lobe-chat/assets/28616219/3b607482-4d99-455a-bc10-3090dd4fe3c5'}
|
||||
bordered
|
||||
inStep
|
||||
height={537}
|
||||
/>
|
||||
|
||||
以配置 OpenAI 为例,你需要添加的环境变量如下:
|
||||
|
||||
| 环境变量 | 类型 | 描述 | 示例 |
|
||||
| --- | --- | --- | --- |
|
||||
| `OPENAI_API_KEY` | 必选 | 这是你在 OpenAI 账户页面申请的 API 密钥 | `sk-xxxxxx...xxxxxx` |
|
||||
| `ACCESS_CODE` | 必选 | 添加访问此服务的密码,你可以设置一个长密码以防被爆破,该值用逗号分隔时为密码数组 | `awCT74` 或 `e3@09!` or `code1,code2,code3` |
|
||||
| `OPENAI_PROXY_URL` | 可选 | 如果你手动配置了 OpenAI 接口代理,可以使用此配置项来覆盖默认的 OpenAI API 请求基础 URL | `https://aihubmix.com/v1` ,默认值:`https://api.openai.com/v1` |
|
||||
|
||||
<Callout type={'info'}>
|
||||
LobeChat 支持的完整环境变量列表请参考 [📘 环境变量](/zh/self-hosting/environment-variables) 部分
|
||||
</Callout>
|
||||
|
||||
添加完成后,最后点击「Deploy lobe-chat」 进入部署阶段。
|
||||
|
||||
<Image
|
||||
alt={'环境变量添加完成'}
|
||||
src={'https://github.com/lobehub/lobe-chat/assets/28616219/c9f74ec4-ce63-4ce9-b9e2-34bda6fda10b'}
|
||||
bordered
|
||||
inStep
|
||||
height={600}
|
||||
/>
|
||||
|
||||
### 等待部署完成
|
||||
|
||||
点击部署后,会进入站点详情页面,你可以点击青色字样的「Deploying your site」或者 「Building」 黄色标签查看部署进度。
|
||||
|
||||
<Image
|
||||
alt={'Netlify 站点详情页'}
|
||||
src={'https://github.com/lobehub/lobe-chat/assets/28616219/a7fd85d5-fd32-4756-814e-ff7ab7567fe1'}
|
||||
bordered
|
||||
inStep
|
||||
height={396}
|
||||
/>
|
||||
|
||||
进入部署详情,你会看到下述界面,这意味着你的 LobeChat 正在部署中,只需等待部署完成即可。
|
||||
|
||||
<Image
|
||||
alt={'LobeChat 部署构建中'}
|
||||
src={'https://github.com/lobehub/lobe-chat/assets/28616219/1ed8b13d-046e-47c8-bd61-116ffdf5d01b'}
|
||||
bordered
|
||||
inStep
|
||||
height={325}
|
||||
/>
|
||||
|
||||
部署构建过程中:
|
||||
|
||||
<Image
|
||||
alt={'部署构建中'}
|
||||
src={'https://github.com/lobehub/lobe-chat/assets/28616219/1c82d707-cb6f-4924-b246-a5235a919864'}
|
||||
bordered
|
||||
inStep
|
||||
height={558}
|
||||
/>
|
||||
### 部署成功,开始使用
|
||||
|
||||
如果你的界面中的 Deploy Log 如下所示,意味着你的 LobeChat 部署成功了。
|
||||
|
||||
<Image
|
||||
alt={'部署成功'}
|
||||
src={'https://github.com/lobehub/lobe-chat/assets/28616219/c1f945d1-f3e2-4100-b6bb-24d4cb13c438'}
|
||||
bordered
|
||||
inStep
|
||||
height={558}
|
||||
/>
|
||||
|
||||
此时,你可以点击「Open production deploy」,即可访问你的 LobeChat 站点
|
||||
|
||||
<Image
|
||||
alt={'访问你的 LobeChat 站点'}
|
||||
src={'https://github.com/lobehub/lobe-chat/assets/28616219/b04723eb-64ad-4028-a901-dc4e4ee2d0c1'}
|
||||
bordered
|
||||
inStep
|
||||
height={527}
|
||||
/>
|
||||
|
||||
</Steps>
|
||||
|
||||
## 绑定自定义域名(可选)
|
||||
|
||||
你可以使用 Netlify 提供的子域名,也可以选择绑定自定义域名。目前 Netlify 提供的域名还未被污染,大多数地区都可以直连。
|
||||
@@ -0,0 +1,28 @@
|
||||
import { Steps } from 'nextra/components';
|
||||
|
||||
# Deploy LobeChat with RepoCloud
|
||||
|
||||
If you want to deploy LobeChat on RepoCloud, you can follow the steps below:
|
||||
|
||||
## RepoCloud Deployment Process
|
||||
|
||||
<Steps>
|
||||
|
||||
### Prepare your OpenAI API Key
|
||||
|
||||
Go to [OpenAI API Key](https://platform.openai.com/account/api-keys) to get your OpenAI API Key.
|
||||
|
||||
### One-click to deploy
|
||||
|
||||
[![][deploy-button-image]][deploy-link]
|
||||
|
||||
### Once deployed, you can start using it
|
||||
|
||||
### Bind a custom domain (optional)
|
||||
|
||||
You can use the subdomain provided by RepoCloud, or choose to bind a custom domain. Currently, the domains provided by RepoCloud have not been contaminated, and most regions can connect directly.
|
||||
|
||||
</Steps>
|
||||
|
||||
[deploy-button-image]: https://d16t0pc4846x52.cloudfront.net/deploy.svg
|
||||
[deploy-link]: https://repocloud.io/details/?app_id=248
|
||||
@@ -0,0 +1,28 @@
|
||||
import { Steps } from 'nextra/components';
|
||||
|
||||
# 使用 RepoCloud 部署
|
||||
|
||||
如果想在 RepoCloud 上部署 LobeChat,可以按照以下步骤进行操作:
|
||||
|
||||
## RepoCloud 部署流程
|
||||
|
||||
<Steps>
|
||||
|
||||
### 准备好你的 OpenAI API Key
|
||||
|
||||
前往 [OpenAI API Key](https://platform.openai.com/account/api-keys) 获取你的 OpenAI API Key
|
||||
|
||||
### 点击下方按钮进行部署
|
||||
|
||||
[![][deploy-button-image]][deploy-link]
|
||||
|
||||
[deploy-button-image]: https://d16t0pc4846x52.cloudfront.net/deploy.svg
|
||||
[deploy-link]: https://repocloud.io/details/?app_id=248
|
||||
|
||||
### 部署完毕后,即可开始使用
|
||||
|
||||
### 绑定自定义域名(可选)
|
||||
|
||||
你可以使用 RepoCloud 提供的子域名,也可以选择绑定自定义域名。目前 RepoCloud 提供的域名还未被污染,大多数地区都可以直连。
|
||||
|
||||
</Steps>
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Steps } from 'nextra/components';
|
||||
|
||||
# Deploying LobeChat on SealOS
|
||||
# Deploy LobeChat with SealOS
|
||||
|
||||
If you want to deploy LobeChat on SealOS, you can follow the steps below:
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Callout, Steps } from 'nextra/components';
|
||||
|
||||
# Vercel Deployment Guide
|
||||
# Deploy LobeChat with Vercel
|
||||
|
||||
If you want to deploy LobeChat on Vercel, you can follow the steps below:
|
||||
|
||||
|
||||
@@ -35,5 +35,5 @@ Vercel 分配的域名 DNS 在某些区域被污染了,绑定自定义域名
|
||||
|
||||
<Callout>
|
||||
我们建议按照 [📘 LobeChat
|
||||
自部署保持更新](/zh/self-hosting/upstream-sync) 步骤重新部署。
|
||||
自部署保持更新](/zh/self-hosting/advanced/upstream-sync) 步骤重新部署。
|
||||
</Callout>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Steps } from 'nextra/components';
|
||||
|
||||
# Deploying on Zeabur
|
||||
# Deploy LobeChat with Zeabur
|
||||
|
||||
If you want to deploy LobeChat on Zeabur, you can follow the steps below:
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
[build]
|
||||
command = "npm run build"
|
||||
publish = ".next"
|
||||
|
||||
|
||||
[template.environment]
|
||||
OPENAI_API_KEY = "set your OpenAI API Key"
|
||||
ACCESS_CODE = "set your password to protect your api key"
|
||||
Reference in New Issue
Block a user