mirror of
https://github.com/lobehub/lobehub
synced 2026-04-21 17:47:27 +00:00
📝 docs: update docker deploy docs [skip ci]
This commit is contained in:
parent
4b9b713447
commit
95df1057f5
3 changed files with 59 additions and 5 deletions
30
README.md
30
README.md
|
|
@ -49,7 +49,8 @@ LobeChat is a open-source, extensible ([Function Calling][fc-link]), high-perfor
|
|||
- [📸 Snapshot](#-snapshot)
|
||||
- [⚡️ Performance](#️-performance)
|
||||
- [🛳 Self Hosting](#-self-hosting)
|
||||
- [Keep Updated](#keep-updated)
|
||||
- [Deploying with Vercel](#deploying-with-vercel)
|
||||
- [Deploying with Docker](#deploying-with-docker)
|
||||
- [📦 Ecosystem](#-ecosystem)
|
||||
- [🧩 Plugins](#-plugins)
|
||||
- [⌨️ Local Development](#️-local-development)
|
||||
|
|
@ -174,6 +175,8 @@ We have carried out a series of optimization designs for mobile devices to enhan
|
|||
|
||||
## 🛳 Self Hosting
|
||||
|
||||
### Deploying with Vercel
|
||||
|
||||
LobeChat provides a [self-hosted version][deploy-link] with Vercel. This allows you to build your own chatbot within a few minutes, without any prior knowledge. If you want to deploy this service yourself, you can follow these steps:
|
||||
|
||||
- Prepare your [OpenAI API Key](https://platform.openai.com/account/api-keys).
|
||||
|
|
@ -196,10 +199,33 @@ LobeChat provides a [self-hosted version][deploy-link] with Vercel. This allows
|
|||
| `OPENAI_PROXY_URL` | No | If you manually configure the OpenAI interface proxy, you can use this configuration item to override the default OpenAI API request base URL | `https://api.chatanywhere.cn/v1`<br/>The default value is<br/>`https://api.openai.com/v1` |
|
||||
| `ACCESS_CODE` | No | Add a password to access this service, the password should be a 6-digit number or letter | `awCT74` or `e3@09!` |
|
||||
|
||||
### Keep Updated
|
||||
#### Keep Updated
|
||||
|
||||
If you have deployed your own project following the one-click deployment steps in the README, you might encounter constant prompts indicating "updates available". This is because Vercel defaults to creating a new project instead of forking this one, resulting in an inability to accurately detect updates. We suggest you redeploy using the following steps, [📘 Maintaining Updates with LobeChat Self-Deployment](https://github.com/lobehub/lobe-chat/wiki/Upstream-Sync).
|
||||
|
||||
### Deploying with Docker
|
||||
|
||||
We provide a Docker image for deploying the LobeChat service on your own private device. Use the following command to start the LobeChat service with one-click:
|
||||
|
||||
```shell
|
||||
docker run -d -p 3210:3210 \
|
||||
-e OPENAI_API_KEY=sk-xxxx \
|
||||
-e ACCESS_CODE=lobe66 \
|
||||
lobehub/lobe-chat
|
||||
```
|
||||
|
||||
If you need to use the OpenAI service through a proxy, you can configure the proxy address using the `OPENAI_PROXY_URL` environment variable:
|
||||
|
||||
```shell
|
||||
docker run -d -p 3210:3210 \
|
||||
-e OPENAI_API_KEY=sk-xxxx \
|
||||
-e OPENAI_PROXY_URL=https://api-proxy.com/v1 \
|
||||
-e ACCESS_CODE=lobe66 \
|
||||
lobehub/lobe-chat
|
||||
```
|
||||
|
||||
For detailed instructions on deploying with Docker, please refer to the [📘 Docker Deployment Guide](docs/Docker-Deployment.md)
|
||||
|
||||
<div align="right">
|
||||
|
||||
[![][back-to-top]](#readme-top)
|
||||
|
|
|
|||
|
|
@ -49,7 +49,8 @@ LobeChat 是一个开源的、可扩展的([Function Calling][fc-link])高
|
|||
- [📸 快照预览](#-快照预览)
|
||||
- [⚡️ 性能测试](#️-性能测试)
|
||||
- [🛳 开箱即用](#-开箱即用)
|
||||
- [保持更新](#保持更新)
|
||||
- [一键部署到 Vercel](#一键部署到-vercel)
|
||||
- [使用 Docker 部署](#使用-docker-部署)
|
||||
- [📦 生态系统](#-生态系统)
|
||||
- [🧩 插件体系](#-插件体系)
|
||||
- [⌨️ 本地开发](#️-本地开发)
|
||||
|
|
@ -176,6 +177,8 @@ LobeChat 提供了两种独特的主题模式 - 明亮模式和暗黑模式,
|
|||
|
||||
## 🛳 开箱即用
|
||||
|
||||
### 一键部署到 Vercel
|
||||
|
||||
LobeChat 提供了 Vercel 的 [自托管版本][deploy-link]。这使你可以在几分钟内构建自己的聊天机器人,无需任何基础知识。如果想自己部署该服务,可以按照以下步骤进行操作:
|
||||
|
||||
- 准备好你的 [OpenAI API Key](https://platform.openai.com/account/api-keys) 。
|
||||
|
|
@ -198,10 +201,33 @@ LobeChat 提供了 Vercel 的 [自托管版本][deploy-link]。这使你可以
|
|||
| `OPENAI_PROXY_URL` | 可选 | 如果你手动配置了 OpenAI 接口代理,可以使用此配置项来覆盖默认的 OpenAI API 请求基础 URL | `https://api.chatanywhere.cn/v1`<br/>默认值:<br/>`https://api.openai.com/v1` |
|
||||
| `ACCESS_CODE` | 可选 | 添加访问此服务的密码,密码应为 6 位数字或字母 | `awCT74` 或 `e3@09!` |
|
||||
|
||||
### 保持更新
|
||||
#### 保持更新
|
||||
|
||||
如果你根据 README 中的一键部署步骤部署了自己的项目,你可能会发现总是被提示 “有可用更新”。这是因为 Vercel 默认为你创建新项目而非 fork 本项目,这将导致无法准确检测更新。我们建议按照 [📘 LobeChat 自部署保持更新](https://github.com/lobehub/lobe-chat/wiki/Upstream-Sync.zh-CN) 步骤重新部署。
|
||||
|
||||
### 使用 Docker 部署
|
||||
|
||||
我们提供了 Docker 镜像,供你在自己的私有设备上部署 LobeChat 服务。使用以下命令即可使用一键启动 LobeChat 服务:
|
||||
|
||||
```shell
|
||||
docker run -d -p 3210:3210 \
|
||||
-e OPENAI_API_KEY=sk-xxxx \
|
||||
-e ACCESS_CODE=lobe66 \
|
||||
lobehub/lobe-chat
|
||||
```
|
||||
|
||||
如果你需要通过代理使用 OpenAI 服务,你可以使用 `OPENAI_PROXY_URL` 环境变量来配置代理地址:
|
||||
|
||||
```shell
|
||||
docker run -d -p 3210:3210 \
|
||||
-e OPENAI_API_KEY=sk-xxxx \
|
||||
-e OPENAI_PROXY_URL=https://api-proxy.com/v1 \
|
||||
-e ACCESS_CODE=lobe66 \
|
||||
lobehub/lobe-chat
|
||||
```
|
||||
|
||||
有关 Docker 部署的详细说明,详见 [📘 使用 Docker 部署](docs/Docker-Deployment.zh-CN.md)
|
||||
|
||||
<div align="right">
|
||||
|
||||
[![][back-to-top]](#readme-top)
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@ docker run -d -p 3210:3210 \
|
|||
lobehub/lobe-chat
|
||||
```
|
||||
|
||||
使用你的 OpenAI API Key 替换上述命令中的 `sk-xxxx` , 官方 Docker 镜像中设定的密码默认为 `lobe66`,请将其替换为自己的密码以提升安全性。
|
||||
|
||||
### 使用代理地址
|
||||
|
||||
如果你需要通过代理使用 OpenAI 服务,你可以使用 `OPENAI_PROXY_URL` 环境变量来配置代理地址:
|
||||
|
|
@ -29,7 +31,7 @@ docker run -d -p 3210:3210 \
|
|||
lobehub/lobe-chat
|
||||
```
|
||||
|
||||
LobeChat 完整的环境变量请参考 [环境变量](./Environment-Variable.zh-CN.md) 部分。
|
||||
LobeChat 支持的完整环境变量列表请参考 [环境变量](./Environment-Variable.zh-CN.md) 部分。
|
||||
|
||||
> **Note**\
|
||||
> 由于官方的 Docker 镜像构建大约需要半小时左右,如果在更新部署后会出现「存在更新」的提示,可以等待镜像构建完成后再次部署。
|
||||
|
|
|
|||
Loading…
Reference in a new issue