Skip to content

Commit 311ca88

Browse files
arvinxxcosark
andauthored
📝 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 <[email protected]>
1 parent 33d4354 commit 311ca88

14 files changed

+448
-29
lines changed

.i18nrc.js

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ module.exports = defineConfig({
2727
experimental: {
2828
jsonMode: true,
2929
},
30+
reference: '你需要保持 mdx 的组件格式,输出文本不需要在最外层包裹任何代码块语法',
3031
markdown: {
3132
entry: ['./README.zh-CN.md', './docs/**/*.zh-CN.md', './docs/**/*.zh-CN.mdx'],
3233
entryLocale: 'zh-CN',

README.zh-CN.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -468,9 +468,9 @@ API Key 是使用 LobeChat 进行大语言模型会话的必要信息,本节
468468
这可以有效降低获取 OpenAI API Key 的门槛。但与此同时,一旦使用三方服务,你可能也需要承担潜在的风险,
469469
请根据你自己的实际情况自行决策。以下是常见的第三方模型代理商列表,供你参考:
470470

471-
| | 服务商 | 特性说明 | Proxy 代理地址 | 链接 |
472-
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | --------------------------------------------------------- | ------------------------- | ------------------------------- |
473-
| <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) |
471+
| | 服务商 | 特性说明 | Proxy 代理地址 | 链接 |
472+
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ |-------------------------------------------| ------------------------- | ------------------------------- |
473+
| <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) |
474474

475475
> \[!WARNING]
476476
>

contributing/Home.md

+28-20
Original file line numberDiff line numberDiff line change
@@ -14,57 +14,65 @@ LobeChat is an open-source, extensible ([Function Calling][fc-url]), high-perfor
1414

1515
![](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/rainbow.png)
1616

17-
<!-- DOCS LIST -->
17+
<!-- DOCS LIST -->
1818

1919
### 🤯 Basic
2020

21-
- [Architecture Design](https://github.com/lobehub/lobe-chat/wiki/Architecture) | [架构设计](https://github.com/lobehub/lobe-chat/wiki/Architecture.zh-CN)
22-
- [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)
23-
- [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)
24-
- [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)
25-
- [Directory Structure](https://github.com/lobehub/lobe-chat/wiki/Folder-Structure) | [目录架构](https://github.com/lobehub/lobe-chat/wiki/Folder-Structure.zh-CN)
26-
- [Environment Setup Guide](https://github.com/lobehub/lobe-chat/wiki/Setup-Development) | [环境设置指南](https://github.com/lobehub/lobe-chat/wiki/Setup-Development.zh-CN)
27-
- [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)
28-
- [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)
29-
- [Resources and References](https://github.com/lobehub/lobe-chat/wiki/Resources) | [资源与参考](https://github.com/lobehub/lobe-chat/wiki/Resources.zh-CN)
30-
- [Technical Development Getting Started Guide](https://github.com/lobehub/lobe-chat/wiki/Intro) | [技术开发上手指南](https://github.com/lobehub/lobe-chat/wiki/Intro.zh-CN)
31-
- [Testing Guide](https://github.com/lobehub/lobe-chat/wiki/Test) | [测试指南](https://github.com/lobehub/lobe-chat/wiki/Test.zh-CN)
21+
- [Architecture Design](https://github.com/lobehub/lobe-chat/wiki/Architecture) | [架构设计](https://github.com/lobehub/lobe-chat/wiki/Architecture.zh-CN)
22+
- [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)
23+
- [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)
24+
- [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)
25+
- [Directory Structure](https://github.com/lobehub/lobe-chat/wiki/Folder-Structure) | [目录架构](https://github.com/lobehub/lobe-chat/wiki/Folder-Structure.zh-CN)
26+
- [Environment Setup Guide](https://github.com/lobehub/lobe-chat/wiki/Setup-Development) | [环境设置指南](https://github.com/lobehub/lobe-chat/wiki/Setup-Development.zh-CN)
27+
- [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)
28+
- [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)
29+
- [Resources and References](https://github.com/lobehub/lobe-chat/wiki/Resources) | [资源与参考](https://github.com/lobehub/lobe-chat/wiki/Resources.zh-CN)
30+
- [Technical Development Getting Started Guide](https://github.com/lobehub/lobe-chat/wiki/Intro) | [技术开发上手指南](https://github.com/lobehub/lobe-chat/wiki/Intro.zh-CN)
31+
- [Testing Guide](https://github.com/lobehub/lobe-chat/wiki/Test) | [测试指南](https://github.com/lobehub/lobe-chat/wiki/Test.zh-CN)
32+
3233

3334
<br/>
3435

3536
### 🌎 Internationalization
3637

37-
- [Internationalization Implementation Guide](https://github.com/lobehub/lobe-chat/wiki/Internationalization-Implementation) | [国际化实现指南](https://github.com/lobehub/lobe-chat/wiki/Internationalization-Implementation.zh-CN)
38-
- [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)
38+
- [Internationalization Implementation Guide](https://github.com/lobehub/lobe-chat/wiki/Internationalization-Implementation) | [国际化实现指南](https://github.com/lobehub/lobe-chat/wiki/Internationalization-Implementation.zh-CN)
39+
- [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)
40+
3941

4042
<br/>
4143

4244
### ⌨️ State Management
4345

44-
- [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)
45-
- [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)
46+
- [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)
47+
- [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)
48+
4649

4750
<br/>
4851

4952
### 🤖 Agents
5053

51-
- [Agent Index and Submit](https://github.com/lobehub/lobe-chat-agents) | [助手索引与提交](https://github.com/lobehub/lobe-chat-agents/blob/main/README.zh-CN.md)
54+
- [Agent Index and Submit](https://github.com/lobehub/lobe-chat-agents) | [助手索引与提交](https://github.com/lobehub/lobe-chat-agents/blob/main/README.zh-CN.md)
55+
5256

5357
<br/>
5458

5559
### 🧩 Plugins
5660

57-
- [Plugin Index and Submit](https://github.com/lobehub/lobe-chat-plugins) | [插件索引与提交](https://github.com/lobehub/lobe-chat-plugins/blob/main/README.zh-CN.md)
58-
- [Plugin SDK Docs](https://chat-plugin-sdk.lobehub.com) | [插件 SDK 文档](https://chat-plugin-sdk.lobehub.com)
61+
- [Plugin Index and Submit](https://github.com/lobehub/lobe-chat-plugins) | [插件索引与提交](https://github.com/lobehub/lobe-chat-plugins/blob/main/README.zh-CN.md)
62+
- [Plugin SDK Docs](https://chat-plugin-sdk.lobehub.com) | [插件 SDK 文档](https://chat-plugin-sdk.lobehub.com)
63+
5964

6065
<br/>
6166

6267
### 📊 Others
6368

64-
- [Lighthouse Reports](https://github.com/lobehub/lobe-chat/wiki/Lighthouse) | [Lighthouse 测试报告](https://github.com/lobehub/lobe-chat/wiki/Lighthouse.zh-CN)
69+
- [Lighthouse Reports](https://github.com/lobehub/lobe-chat/wiki/Lighthouse) | [Lighthouse 测试报告](https://github.com/lobehub/lobe-chat/wiki/Lighthouse.zh-CN)
70+
6571

6672
<br/>
6773

74+
75+
6876
<!-- DOCS LIST -->
6977

7078
---

contributing/_Sidebar.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
- [TOC](Home.md) | [目录](Home.md)
66

7-
<!-- DOCS LIST -->
7+
<!-- DOCS LIST -->
88

99
#### 🤯 Basic
1010

@@ -20,29 +20,37 @@
2020
- [Technical Development Getting Started Guide](https://github.com/lobehub/lobe-chat/wiki/Intro) | [技术开发上手指南](https://github.com/lobehub/lobe-chat/wiki/Intro.zh-CN)
2121
- [Testing Guide](https://github.com/lobehub/lobe-chat/wiki/Test) | [测试指南](https://github.com/lobehub/lobe-chat/wiki/Test.zh-CN)
2222

23+
2324
#### 🌎 Internationalization
2425

2526
- [Internationalization Implementation Guide](https://github.com/lobehub/lobe-chat/wiki/Internationalization-Implementation) | [国际化实现指南](https://github.com/lobehub/lobe-chat/wiki/Internationalization-Implementation.zh-CN)
2627
- [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)
2728

29+
2830
#### ⌨️ State Management
2931

3032
- [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)
3133
- [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)
3234

35+
3336
#### 🤖 Agents
3437

3538
- [Agent Index and Submit](https://github.com/lobehub/lobe-chat-agents) | [助手索引与提交](https://github.com/lobehub/lobe-chat-agents/blob/main/README.zh-CN.md)
3639

40+
3741
#### 🧩 Plugins
3842

3943
- [Plugin Index and Submit](https://github.com/lobehub/lobe-chat-plugins) | [插件索引与提交](https://github.com/lobehub/lobe-chat-plugins/blob/main/README.zh-CN.md)
4044
- [Plugin SDK Docs](https://chat-plugin-sdk.lobehub.com) | [插件 SDK 文档](https://chat-plugin-sdk.lobehub.com)
4145

46+
4247
#### 📊 Others
4348

4449
- [Lighthouse Reports](https://github.com/lobehub/lobe-chat/wiki/Lighthouse) | [Lighthouse 测试报告](https://github.com/lobehub/lobe-chat/wiki/Lighthouse.zh-CN)
4550

51+
52+
53+
4654
<!-- DOCS LIST -->
4755

4856
<!-- LINK GROUP -->

docs/self-hosting/platform/docker.zh-CN.mdx

+3-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ $ docker run -d -p 3210:3210 \
5353
- 默认映射端口为 `3210`, 请确保未被占用或手动更改端口映射
5454
- 使用你的 OpenAI API Key 替换上述命令中的 `sk-xxxx`
5555

56-
- LobeChat 支持的完整环境变量列表请参考 [环境变量](/zh/self-hosting/environment-ariable) 部分
56+
<Callout type={'info'}>
57+
LobeChat 支持的完整环境变量列表请参考 [📘 环境变量](/zh/self-hosting/environment-variables) 部分
58+
</Callout>
5759

5860
<Callout>
5961
由于官方的 Docker
+170
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
import { Callout, Steps } from 'nextra/components';
2+
3+
# Deploy LobeChat with Netlify
4+
5+
If you want to deploy LobeChat on Netlify, you can follow these steps:
6+
7+
## Deploy LobeChat with Netlify
8+
9+
<Steps>
10+
11+
### Fork the LobeChat Repository
12+
13+
Click the Fork button to fork the LobeChat repository to your GitHub account.
14+
15+
### Prepare your OpenAI API Key
16+
17+
Go to [OpenAI API Key](https://platform.openai.com/account/api-keys) to obtain your OpenAI API Key.
18+
19+
### Import to Netlify Workspace
20+
21+
<Callout>
22+
After testing, it is currently not supported to have a one-click deployment button similar to
23+
Vercel/Zeabur. The reason is unknown. Therefore, manual import is required.
24+
</Callout>
25+
26+
Click "Import from git"
27+
28+
<Image
29+
alt={'Click "Import from git" in the Netlify workspace'}
30+
src={'https://github.com/lobehub/lobe-chat/assets/28616219/31b999e5-2a74-45fc-935b-f036e72a684d'}
31+
bordered
32+
inStep
33+
height={362}
34+
/>
35+
36+
Then click "Deploy with Github" and authorize Netlify to access your GitHub account.
37+
38+
<Image
39+
alt={'Authorize Netlify to access your GitHub account'}
40+
src={'https://github.com/lobehub/lobe-chat/assets/28616219/c9c58141-5ec6-43f1-8d97-0a84a04dcdba'}
41+
bordered
42+
inStep
43+
height={273}
44+
/>
45+
46+
Next, select the LobeChat project:
47+
48+
<Image
49+
alt={'Select the LobeChat github project'}
50+
src={'https://github.com/lobehub/lobe-chat/assets/28616219/6c3968a8-fbbb-4268-a587-edaced2d96af'}
51+
bordered
52+
inStep
53+
height={228}
54+
/>
55+
56+
### Configure Site Name and Environment Variables
57+
58+
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.
59+
60+
<Image
61+
alt={'Configure LobeChat site name'}
62+
src={'https://github.com/lobehub/lobe-chat/assets/28616219/f3885537-6d43-422f-b1b8-e70732401025'}
63+
bordered
64+
inStep
65+
height={712}
66+
/>
67+
68+
Click the "Add environment variables" button to add site environment variables:
69+
70+
<Image
71+
alt={'Add LobeChat site environment variables'}
72+
src={'https://github.com/lobehub/lobe-chat/assets/28616219/3b607482-4d99-455a-bc10-3090dd4fe3c5'}
73+
bordered
74+
inStep
75+
height={537}
76+
/>
77+
78+
Taking OpenAI as an example, the environment variables you need to add are as follows:
79+
80+
| Environment Variable | Type | Description | Example |
81+
| --- | --- | --- | --- |
82+
| `OPENAI_API_KEY` | Required | This is the API key you applied for on the OpenAI account page | `sk-xxxxxx...xxxxxx` |
83+
| `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` |
84+
| `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` |
85+
86+
<Callout type={'info'}>
87+
For a complete list of environment variables supported by LobeChat, please refer to the [📘
88+
Environment Variables](/en/self-hosting/environment-variables)
89+
</Callout>
90+
91+
Afteradding the variables, finally click "Deploy lobe-chat" to enter the deployment phase
92+
93+
<Image
94+
alt={'Environment variables added'}
95+
src={'https://github.com/lobehub/lobe-chat/assets/28616219/c9f74ec4-ce63-4ce9-b9e2-34bda6fda10b'}
96+
bordered
97+
inStep
98+
height={600}
99+
/>
100+
101+
### Wait for Deployment to Complete
102+
103+
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.
104+
105+
<Image
106+
alt={'Netlify site details page'}
107+
src={'https://github.com/lobehub/lobe-chat/assets/28616219/a7fd85d5-fd32-4756-814e-ff7ab7567fe1'}
108+
bordered
109+
inStep
110+
height={396}
111+
/>
112+
113+
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.
114+
115+
<Image
116+
alt={'LobeChat deployment in progress'}
117+
src={'https://github.com/lobehub/lobe-chat/assets/28616219/1ed8b13d-046e-47c8-bd61-116ffdf5d01b'}
118+
bordered
119+
inStep
120+
height={325}
121+
/>
122+
123+
During the deployment and build process:
124+
125+
<Image
126+
alt={'Deployment in progress'}
127+
src={'https://github.com/lobehub/lobe-chat/assets/28616219/1c82d707-cb6f-4924-b246-a5235a919864'}
128+
bordered
129+
inStep
130+
height={558}
131+
/>
132+
133+
### Deployment Successful, Start Using
134+
135+
If your Deploy Log in the interface looks like the following, it means your LobeChat has been successfully deployed.
136+
137+
<Image
138+
alt={'Deployment Successful'}
139+
src={'https://github.com/lobehub/lobe-chat/assets/28616219/c1f945d1-f3e2-4100-b6bb-24d4cb13c438'}
140+
bordered
141+
inStep
142+
height={558}
143+
/>
144+
At this point, you can click on "Open production deploy" to access your LobeChat site.
145+
146+
<Image
147+
alt={'Access Your LobeChat Site'}
148+
src={'https://github.com/lobehub/lobe-chat/assets/28616219/b04723eb-64ad-4028-a901-dc4e4ee2d0c1'}
149+
bordered
150+
inStep
151+
height={527}
152+
/>
153+
154+
</Steps>
155+
156+
## Set up Custom Domain (Optional)
157+
158+
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.
159+
160+
[//]: # '[![][deploy-button-image]][deploy-link]'
161+
[//]: # '[deploy-button-image]: https://www.netlify.com/img/deploy/button.svg'
162+
[//]: # '[deploy-link]: https://app.netlify.com/start/deploy?repository=https://github.com/lobehub/lobe-chat'
163+
[//]: # '### 授权 Netlify 访问你的 GitHub 账号'
164+
[//]: # '点击 「Connect to GitHub」,授权 Netlify 访问你的 GitHub 账号:'
165+
[//]: # 'Image'
166+
[//]: # 'github.com/lobehub/lobe-chat/assets/28616219/8ee533d5-f7e9-4523-991b-2c23a72c1530'
167+
[//]: # ' bordered'
168+
[//]: # ' width={790}'
169+
[//]: # ' height={556}'
170+
[//]: # '/>'

0 commit comments

Comments
 (0)