mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-10-30 04:15:45 +08:00
docs: add comment on setting config.yaml via env
This commit is contained in:
@@ -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.
|
||||
@@ -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 文件中。
|
||||
Generated
+2596
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user