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.