Skip to content

Commit

Permalink
💄 style: update model locale (#5731)
Browse files Browse the repository at this point in the history
* update docs

* update locale
  • Loading branch information
arvinxx authored Feb 4, 2025
1 parent 53f3595 commit d3d26d7
Show file tree
Hide file tree
Showing 20 changed files with 479 additions and 696 deletions.
62 changes: 31 additions & 31 deletions docs/self-hosting/server-database/docker-compose.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -198,12 +198,12 @@ The script supports the following deployment modes; please choose the appropriat

In domain mode, you need to complete the reverse proxy configuration and ensure that the LAN/public can access the following services. Please use a reverse proxy to map the following service ports to the domain names:

| Domain | Proxy Port | Required |
| --------------------- | ---------- | -------- |
| `lobe.example.com` | `3210` | Yes |
| `auth-ui.example.com` | `8000` | Yes |
| `s3-api.example.com` | `9000` | Yes |
| `s3-ui.example.com` | `9001` | No |
| Domain | Proxy Port | Required |
| ---------------------- | ---------- | -------- |
| `lobe.example.com` | `3210` | Yes |
| `auth.example.com` | `8000` | Yes |
| `minio.example.com` | `9000` | Yes |
| `minio-ui.example.com` | `9001` | |

<Callout type="important">
If you are using panel software like [APanel](https://www.bt.cn/) for reverse proxy configuration,
Expand All @@ -226,8 +226,8 @@ The script supports the following deployment modes; please choose the appropriat
In domain mode, you need to complete the following configurations based on script prompts:

- Domain setup for the LobeChat service: `lobe.example.com`
- Domain setup for the Minio service: `s3-api.example.com`
- Domain setup for the Casdoor service: `auth-ui.example.com`
- Domain setup for the Minio service: `minio.example.com`
- Domain setup for the Casdoor service: `auth.example.com`
- Choose the access protocol: `http` or `https`
- Regenerate secure keys: We highly recommend regenerating the secure keys; if you lack the key generation library required by the script, we suggest referring to the [Custom Deployment](#custom-deployment) section for key modifications.

Expand Down Expand Up @@ -256,11 +256,11 @@ The script supports the following deployment modes; please choose the appropriat
- Username: user
- Password: 837e26
Casdoor:
- URL: https://auth-ui.example.com
- URL: https://auth.example.com
- Username: admin
- Password: 837e26
Minio:
- URL: https://s3-api.example.com
- URL: https://minio.example.com
- Username: admin
- Password: dbac8440
```
Expand Down Expand Up @@ -336,7 +336,7 @@ Now, we will introduce the necessary configurations for running these services:
- LobeChat requires communication with Casdoor, so you need to configure Casdoor's Issuer.

```env
AUTH_CASDOOR_ISSUER=https://auth-ui.example.com
AUTH_CASDOOR_ISSUER=https://auth.example.com
```

This configuration will affect LobeChat's login authentication service, and you need to ensure that the URL of the Casdoor service is correct. You can find common manifestations and solutions for errors in this configuration in the [FAQ](#faq).
Expand All @@ -346,22 +346,22 @@ This configuration will affect LobeChat's login authentication service, and you
Please add a line in the `Authentication -> Application` -> `<Application ID, default is app-built-in>` -> `Redirect URI` in Casdoor's web panel:

```
https://auth-ui.example.com/api/auth/callback/casdoor
https://auth.example.com/api/auth/callback/casdoor
```

- Casdoor needs to provide the Origin information for access in the environment variables:

```env
origin=https://auth-ui.example.com
origin=https://auth.example.com
```

2. MinIO

- LobeChat needs to provide a public access URL for object files for the LLM service provider, hence you need to configure MinIO's Endpoint.

```env
S3_PUBLIC_DOMAIN=https://s3-api.example.com
S3_ENDPOINT=https://s3-api.example.com
S3_PUBLIC_DOMAIN=https://minio.example.com
S3_ENDPOINT=https://minio.example.com
```

3. PostgreSQL
Expand Down Expand Up @@ -397,9 +397,9 @@ Solutions:

- Please refer to the reverse proxy configuration notes in the [Domain Mode](#domain-mode) section.

- A direct troubleshooting method is to access `https://auth-ui.example.com/.well-known/openid-configuration` directly; if:
- A direct troubleshooting method is to access `https://auth.example.com/.well-known/openid-configuration` directly; if:
- Non-JSON format data is returned, it indicates your reverse proxy configuration is incorrect.
- If the returned JSON format data contains an `"issuer": "URL"` field that does not match your configured `https://auth-ui.example.com`, it indicates your environment variable configuration is incorrect.
- If the returned JSON format data contains an `"issuer": "URL"` field that does not match your configured `https://auth.example.com`, it indicates your environment variable configuration is incorrect.

- TypeError: fetch failed

Expand All @@ -413,7 +413,7 @@ Solutions:

- Check whether your authentication service is running properly and whether LobeChat's network can reach the authentication service.

- A straightforward troubleshooting method is to use the `curl` command in the LobeChat container terminal to access your authentication service at `https://auth-ui.example.com/.well-known/openid-configuration`. If JSON format data is returned, it indicates your authentication service is functioning correctly.
- A straightforward troubleshooting method is to use the `curl` command in the LobeChat container terminal to access your authentication service at `https://auth.example.com/.well-known/openid-configuration`. If JSON format data is returned, it indicates your authentication service is functioning correctly.

````markdown
## Extended Configuration
Expand Down Expand Up @@ -490,9 +490,9 @@ In the following, it is assumed that in addition to the above services, you are
The domain and corresponding service port descriptions are as follows:

- `lobe.example.com`: This is your LobeChat service domain, which needs to reverse proxy to the LobeChat service port, default is `3210`.
- `auth-ui.example.com`: This is your Logto UI domain, which needs to reverse proxy to the Logto WebUI service port, default is `8000`.
- `s3-api.example.com`: This is your MinIO API domain, which needs to reverse proxy to the MinIO API service port, default is `9000`.
- `s3-ui.example.com`: Optional, this is your MinIO UI domain, which needs to reverse proxy to the MinIO WebUI service port, default is `9001`.
- `auth.example.com`: This is your Logto UI domain, which needs to reverse proxy to the Logto WebUI service port, default is `8000`.
- `minio.example.com`: This is your MinIO API domain, which needs to reverse proxy to the MinIO API service port, default is `9000`.
- `minio-ui.example.com`: Optional, this is your MinIO UI domain, which needs to reverse proxy to the MinIO WebUI service port, default is `9001`.

#### Configuration File

Expand All @@ -518,7 +518,7 @@ Next, modify the configuration files to achieve domain release.
```
2. Modify the `origin` field of `casdoor`.
```yaml
origin: 'https://auth-ui.example.com'
origin: 'https://auth.example.com'
```
3. Modify the `environment` field of `lobe`.
```yaml
Expand All @@ -532,15 +532,15 @@ Next, modify the configuration files to achieve domain release.
- 'AUTH_URL=https://lobe.example.com/api/auth'
# - 'AUTH_CASDOOR_ISSUER=http://localhost:${CASDOOR_PORT}'
- 'AUTH_CASDOOR_ISSUER=https://auth-ui.example.com'
- 'AUTH_CASDOOR_ISSUER=https://auth.example.com'
- 'DATABASE_URL=postgresql://postgres:${POSTGRES_PASSWORD}@postgresql:5432/${LOBE_DB_NAME}'
# - 'S3_ENDPOINT=http://localhost:${MINIO_PORT}'
- 'S3_ENDPOINT=https://s3-api.example.com'
- 'S3_ENDPOINT=https://minio.example.com'
- 'S3_BUCKET=${MINIO_LOBE_BUCKET}'
# - 'S3_PUBLIC_DOMAIN=http://localhost:${MINIO_PORT}'
- 'S3_PUBLIC_DOMAIN=https://s3-api.example.com'
- 'S3_PUBLIC_DOMAIN=https://minio.example.com'
- 'S3_ENABLE_PATH_STYLE=1'
- 'LLM_VISION_IMAGE_USE_BASE64=1'
Expand Down Expand Up @@ -582,7 +582,7 @@ docker compose up -d # Restart

You first need to access the WebUI for configuration:

- If you have set up the reverse proxy as mentioned before, open `https://auth-ui.example.com`
- If you have set up the reverse proxy as mentioned before, open `https://auth.example.com`
- Otherwise, after port mapping, open `http://localhost:8000`

Log in to the admin account:
Expand Down Expand Up @@ -621,7 +621,7 @@ This article uses MinIO as an example to explain the configuration process. If y

You first need to access the WebUI for configuration:

- If you have set up the reverse proxy as mentioned before, open `https://s3-ui.example.com`
- If you have set up the reverse proxy as mentioned before, open `https://minio-ui.example.com`
- Otherwise, after port mapping, open `http://localhost:9001`

1. Enter the `MINIO_ROOT_USER` and `MINIO_ROOT_PASSWORD` you set in the login interface, then click login.
Expand Down Expand Up @@ -745,7 +745,7 @@ services:
driverName: 'postgres'
dataSourceName: 'user=postgres password=${POSTGRES_PASSWORD} host=postgresql port=5432 sslmode=disable dbname=casdoor'
# origin: 'http://localhost:${CASDOOR_PORT}'
origin: 'https://auth-ui.example.com'
origin: 'https://auth.example.com'
runmode: 'dev'
volumes:
- ./init_data.json:/init_data.json
Expand Down Expand Up @@ -775,15 +775,15 @@ services:
- 'AUTH_URL=https://lobe.example.com/api/auth'
# - 'AUTH_CASDOOR_ISSUER=http://localhost:${CASDOOR_PORT}'
- 'AUTH_CASDOOR_ISSUER=https://auth-ui.example.com'
- 'AUTH_CASDOOR_ISSUER=https://auth.example.com'
- 'DATABASE_URL=postgresql://postgres:${POSTGRES_PASSWORD}@postgresql:5432/${LOBE_DB_NAME}'
# - 'S3_ENDPOINT=http://localhost:${MINIO_PORT}'
- 'S3_ENDPOINT=https://s3-api.example.com'
- 'S3_ENDPOINT=https://minio.example.com'
- 'S3_BUCKET=${MINIO_LOBE_BUCKET}'
# - 'S3_PUBLIC_DOMAIN=http://localhost:${MINIO_PORT}'
- 'S3_PUBLIC_DOMAIN=https://s3-api.example.com'
- 'S3_PUBLIC_DOMAIN=https://minio.example.com'
- 'S3_ENABLE_PATH_STYLE=1'
- 'LLM_VISION_IMAGE_USE_BASE64=1'
Expand Down
64 changes: 32 additions & 32 deletions docs/self-hosting/server-database/docker-compose.zh-CN.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -199,12 +199,12 @@ bash <(curl -fsSL https://lobe.li/setup.sh) -l zh_CN

在域名模式中,你需要完成反向代理配置,并确保局域网 / 公网能访问到以下服务。请使用反向代理将以下服务端口映射到域名:

| 域名 | 反代端口 | 是否必选 |
| --------------------- | ------ | ---- |
| `lobe.example.com` | `3210` | 必选 |
| `auth-ui.example.com` | `8000` | 必选 |
| `s3-api.example.com` | `9000` | 必选 |
| `s3-ui.example.com` | `9001` | |
| 域名 | 反代端口 | 是否必选 |
| ---------------------- | ------ | ---- |
| `lobe.example.com` | `3210` | 必选 |
| `auth.example.com` | `8000` | 必选 |
| `minio.example.com` | `9000` | 必选 |
| `minio-ui.example.com` | `9001` | |

<Callout type="important">
如果你使用如 [宝塔面板](https://www.bt.cn/) 等面板软件进行反向代理配置,
Expand All @@ -227,8 +227,8 @@ bash <(curl -fsSL https://lobe.li/setup.sh) -l zh_CN
在域名模式中,你需要根据脚本提示完成:

- LobeChat 服务的域名设置:`lobe.example.com`
- Minio 服务的域名设置:`s3-api.example.com`
- Casdoor 服务的域名设置:`auth-ui.example.com`
- Minio 服务的域名设置:`minio.example.com`
- Casdoor 服务的域名设置:`auth.example.com`
- 选择访问协议:`http``https`
- 安全密钥重新生成:我们强烈建议你重新生成安全密钥,如果你缺少脚本所需的密钥生成库,我们建议你参考 [自定义部署](#自定义部署) 章节对密钥进行修改。

Expand Down Expand Up @@ -257,11 +257,11 @@ bash <(curl -fsSL https://lobe.li/setup.sh) -l zh_CN
- Username: user
- Password: 837e26
Casdoor:
- URL: https://auth-ui.example.com
- URL: https://auth.example.com
- Username: admin
- Password: 837e26
Minio:
- URL: https://s3-api.example.com
- URL: https://minio.example.com
- Username: admin
- Password: dbac8440
```
Expand Down Expand Up @@ -338,7 +338,7 @@ mv .env.zh-CN.example .env
- LobeChat 需要与 Casdoor 通讯,因此你需要配置 Casdoor 的 Issuer 。

```env
AUTH_CASDOOR_ISSUER=https://auth-ui.example.com
AUTH_CASDOOR_ISSUER=https://auth.example.com
```

该配置会影响 LobeChat 的登录鉴权服务,你需要确保 Casdoor 服务的地址正确。
Expand All @@ -349,22 +349,22 @@ AUTH_CASDOOR_ISSUER=https://auth-ui.example.com
请在 Casdoor 的 Web 面板的 `身份认证 -> 应用` -> `<应用ID,默认为 app-built-in>` -> `重定向URL` 中添加一行:

```
https://auth-ui.example.com/api/auth/callback/casdoor
https://auth.example.com/api/auth/callback/casdoor
```

- Casdoor 需要在环境变量中提供访问的 Origin 信息:

```env
origin=https://auth-ui.example.com
origin=https://auth.example.com
```

2. MinIO

- LobeChat 需要为 LLM 服务提供商提供文件对象的公网访问地址,因此你需要配置 MinIO 的 Endpoint 。

```env
S3_PUBLIC_DOMAIN=https://s3-api.example.com
S3_ENDPOINT=https://s3-api.example.com
S3_PUBLIC_DOMAIN=https://minio.example.com
S3_ENDPOINT=https://minio.example.com
```

3. PostgreSQL
Expand Down Expand Up @@ -400,9 +400,9 @@ lobe-chat | [auth][error] r3: "response" is not a conform Authorization Ser

- 请参考 [域名模式](#域名模式) 章节中的反向代理配置注意事项。

- 一个直接的排查方式,你可以直接访问 `https://auth-ui.example.com/.well-known/openid-configuration`,如果
- 一个直接的排查方式,你可以直接访问 `https://auth.example.com/.well-known/openid-configuration`,如果
- 返回了非 JSON 格式的数据,则说明你的反向代理配置错误。
- 如果返回的 JSON 格式数据中的 `"issuer": "URL"` 字段不是你配置的 `https://auth-ui.example.com`,则说明你的环境变量配置错误。
- 如果返回的 JSON 格式数据中的 `"issuer": "URL"` 字段不是你配置的 `https://auth.example.com`,则说明你的环境变量配置错误。

- TypeError: fetch failed

Expand All @@ -416,7 +416,7 @@ lobe-chat | [auth][error] TypeError: fetch failed

- 请检查你的鉴权服务是否正常运行,以及 LobeChat 所在的网络是否能够访问到鉴权服务。

- 一个直接的排查方式,你可以在 LobeChat 容器的终端中,使用 `curl` 命令访问你的鉴权服务 `https://auth-ui.example.com/.well-known/openid-configuration`,如果返回了 JSON 格式的数据,则说明你的鉴权服务正常运行。
- 一个直接的排查方式,你可以在 LobeChat 容器的终端中,使用 `curl` 命令访问你的鉴权服务 `https://auth.example.com/.well-known/openid-configuration`,如果返回了 JSON 格式的数据,则说明你的鉴权服务正常运行。

## 拓展配置

Expand Down Expand Up @@ -494,14 +494,14 @@ lobe-chat | [auth][error] TypeError: fetch failed
域名和配套服务端口说明如下:

- `lobe.example.com`:为你的 LobeChat 服务端域名,需要反向代理到 LobeChat 服务端口,默认为 `3210`
- `auth-ui.example.com`:为你的 Logto UI 域名,需要反向代理到 Logto WebUI 服务端口,默认为 `8000`
- `s3-api.example.com`:为你的 MinIO API 域名,需要反向代理到 MinIO API 服务端口,默认为 `9000`
- `s3-ui.example.com`:可选,为你的 MinIO UI 域名,需要反向代理到 MinIO WebUI 服务端口,默认为 `9001`
- `auth.example.com`:为你的 Logto UI 域名,需要反向代理到 Logto WebUI 服务端口,默认为 `8000`
- `minio.example.com`:为你的 MinIO API 域名,需要反向代理到 MinIO API 服务端口,默认为 `9000`
- `minio-ui.example.com`:可选,为你的 MinIO UI 域名,需要反向代理到 MinIO WebUI 服务端口,默认为 `9001`

#### 配置文件

```sh
bash <(curl -fsSL https://raw.githubusercontent.com/lobehub/lobe-chat/HEAD/docker-compose/local/setup.sh) -f -l zh_CN
bash <(curl -fsSL https://lobe.li/setup.sh) -l zh_CN
docker compose up -d
```

Expand All @@ -522,7 +522,7 @@ docker compose up -d
```
2. 修改`casdoor``origin`字段。
```yaml
origin: 'https://auth-ui.example.com'
origin: 'https://auth.example.com'
```
3. 修改`lobe`的`environment`字段。
```yaml
Expand All @@ -536,15 +536,15 @@ docker compose up -d
- 'AUTH_URL=https://lobe.example.com/api/auth'
# - 'AUTH_CASDOOR_ISSUER=http://localhost:${CASDOOR_PORT}'
- 'AUTH_CASDOOR_ISSUER=https://auth-ui.example.com'
- 'AUTH_CASDOOR_ISSUER=https://auth.example.com'
- 'DATABASE_URL=postgresql://postgres:${POSTGRES_PASSWORD}@postgresql:5432/${LOBE_DB_NAME}'
# - 'S3_ENDPOINT=http://localhost:${MINIO_PORT}'
- 'S3_ENDPOINT=https://s3-api.example.com'
- 'S3_ENDPOINT=https://minio.example.com'
- 'S3_BUCKET=${MINIO_LOBE_BUCKET}'
# - 'S3_PUBLIC_DOMAIN=http://localhost:${MINIO_PORT}'
- 'S3_PUBLIC_DOMAIN=https://s3-api.example.com'
- 'S3_PUBLIC_DOMAIN=https://minio.example.com'
- 'S3_ENABLE_PATH_STYLE=1'
- 'LLM_VISION_IMAGE_USE_BASE64=1'
Expand Down Expand Up @@ -588,7 +588,7 @@ docker compose up -d # 重新启动

你需要首先访问 WebUI 来进行配置:

- 如果你按照前文配置了反向代理,打开 `https://auth-ui.example.com`
- 如果你按照前文配置了反向代理,打开 `https://auth.example.com`
- 否则,请在进行端口映射后,打开 `http://localhost:8000`

登录管理员账户
Expand Down Expand Up @@ -627,7 +627,7 @@ docker compose up -d # 重新启动

你需要首先访问 WebUI 来进行配置:

- 如果你按照前文配置了反向代理,打开 `https://s3-ui.example.com`
- 如果你按照前文配置了反向代理,打开 `https://minio-ui.example.com`
- 否则,请在进行端口映射后,打开 `http://localhost:9001`

1. 在登录界面输入你设置的 `MINIO_ROOT_USER` 和 `MINIO_ROOT_PASSWORD`,然后点击登录
Expand Down Expand Up @@ -754,7 +754,7 @@ services:
driverName: 'postgres'
dataSourceName: 'user=postgres password=${POSTGRES_PASSWORD} host=postgresql port=5432 sslmode=disable dbname=casdoor'
# origin: 'http://localhost:${CASDOOR_PORT}'
origin: 'https://auth-ui.example.com'
origin: 'https://auth.example.com'
runmode: 'dev'
volumes:
- ./init_data.json:/init_data.json
Expand Down Expand Up @@ -784,15 +784,15 @@ services:
- 'AUTH_URL=https://lobe.example.com/api/auth'
# - 'AUTH_CASDOOR_ISSUER=http://localhost:${CASDOOR_PORT}'
- 'AUTH_CASDOOR_ISSUER=https://auth-ui.example.com'
- 'AUTH_CASDOOR_ISSUER=https://auth.example.com'
- 'DATABASE_URL=postgresql://postgres:${POSTGRES_PASSWORD}@postgresql:5432/${LOBE_DB_NAME}'
# - 'S3_ENDPOINT=http://localhost:${MINIO_PORT}'
- 'S3_ENDPOINT=https://s3-api.example.com'
- 'S3_ENDPOINT=https://minio.example.com'
- 'S3_BUCKET=${MINIO_LOBE_BUCKET}'
# - 'S3_PUBLIC_DOMAIN=http://localhost:${MINIO_PORT}'
- 'S3_PUBLIC_DOMAIN=https://s3-api.example.com'
- 'S3_PUBLIC_DOMAIN=https://minio.example.com'
- 'S3_ENABLE_PATH_STYLE=1'
- 'LLM_VISION_IMAGE_USE_BASE64=1'
Expand Down
Loading

0 comments on commit d3d26d7

Please sign in to comment.