docs: add comment on setting config.yaml via env

This commit is contained in:
Junyan Qin
2025-11-05 18:14:32 +08:00
parent 77bd5adb81
commit 2c1e9a1d67
3 changed files with 2626 additions and 0 deletions
+15
View File
@@ -85,3 +85,18 @@ vdb:
# Qdrant API Key
api_key: ''
```
## Set configuration via environment variables
The configuration in `config.yaml` can be set via environment variables. The environment variable name is uppercase letters, using double underscores to connect, for example: `API__PORT` represents `api.port`.
- `API__PORT` represents `api.port`
- `CONCURRENCY__PIPELINE` represents `concurrency.pipeline`
- `CONCURRENCY__SESSION` represents `concurrency.session`
- `DATABASE__POSTGRESQL__DATABASE` represents `database.postgresql.database`
- `DATABASE__POSTGRESQL__HOST` represents `database.postgresql.host`
- `DATABASE__SQLITE__PATH` represents `database.sqlite.path`
...
When starting, LangBot will read all environment variables and apply the corresponding configuration to `config.yaml` and write to the `data/config.yaml` file.
+15
View File
@@ -85,3 +85,18 @@ vdb:
# Qdrant 的 API Key
api_key: ''
```
## 通过环境变量设置
config.yaml 中的配置可以通过环境变量进行设置。环境变量名称为大写字母,使用双下划线连接,例如:`API__PORT`代表`api.port`。
- `API__PORT` 代表 `api.port`
- `CONCURRENCY__PIPELINE` 代表 `concurrency.pipeline`
- `CONCURRENCY__SESSION` 代表 `concurrency.session`
- `DATABASE__POSTGRESQL__DATABASE` 代表 `database.postgresql.database`
- `DATABASE__POSTGRESQL__HOST` 代表 `database.postgresql.host`
- `DATABASE__SQLITE__PATH` 代表 `database.sqlite.path`
...
在启动时,LangBot 会读取所有环境变量,将对应的配置应用到 config.yaml 中并写入到 data/config.yaml 文件中。
+2596
View File
File diff suppressed because it is too large Load Diff