Skip to content

Commit

Permalink
📝 docs: add more deployment documents (lobehub#1393)
Browse files Browse the repository at this point in the history
* 📝 docs: Creating self-hosting documents repocloud.mdx (lobehub#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 (lobehub#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>
  • Loading branch information
arvinxx and cosark committed Feb 27, 2024
1 parent 33d4354 commit 311ca88
Show file tree
Hide file tree
Showing 14 changed files with 448 additions and 29 deletions.
1 change: 1 addition & 0 deletions .i18nrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
6 changes: 3 additions & 3 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
>
Expand Down
48 changes: 28 additions & 20 deletions contributing/Home.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,57 +14,65 @@ LobeChat is an open-source, extensible ([Function Calling][fc-url]), high-perfor

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

<!-- 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 -->

---
Expand Down
10 changes: 9 additions & 1 deletion contributing/_Sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

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

<!-- DOCS LIST -->
<!-- DOCS LIST -->

#### 🤯 Basic

Expand All @@ -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 -->
4 changes: 3 additions & 1 deletion docs/self-hosting/platform/docker.zh-CN.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
170 changes: 170 additions & 0 deletions docs/self-hosting/platform/netlify.mdx
Original file line number Diff line number Diff line change
@@ -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}'
[//]: # '/>'
Loading

0 comments on commit 311ca88

Please sign in to comment.