Expand description
Environment variable overrides for atrg.toml configuration.
Any field in Config can be overridden at runtime
via an environment variable. The naming convention uses a double-underscore
(__) to separate the section from the field:
| Config field | Env var |
|---|---|
app.name | ATRG_APP__NAME |
app.host | ATRG_APP__HOST |
app.port | ATRG_APP__PORT |
app.secret_key | ATRG_APP__SECRET_KEY |
app.environment | ATRG_APP__ENVIRONMENT |
app.cors_origins | ATRG_APP__CORS_ORIGINS |
auth.client_id | ATRG_AUTH__CLIENT_ID |
auth.redirect_uri | ATRG_AUTH__REDIRECT_URI |
auth.scope | ATRG_AUTH__SCOPE |
database.url | ATRG_DATABASE__URL |
For app.cors_origins, provide a comma-separated list of origins, e.g.
ATRG_APP__CORS_ORIGINS="http://localhost:5173,https://example.com".
Invalid values (e.g. a non-numeric ATRG_APP__PORT) are logged as warnings
and silently ignored — the original config value is preserved.
Functions§
- apply_
env_ overrides - Apply environment variable overrides to a mutable
Config.