You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IMO actix-settings should have a default mechanism for overriding all settings from the environment. i.e. it should provide a consistent mapping of its settings to env-var names, so there is a function like 'apply_env(..)' which will read the env and override with any values found there.
Env vars are the more typical approach for overriding settings in a production service, e.g. in k8s. c.f. https://12factor.net/config and many others.
Some people prefer to use config files over envvars, but usually settings systems allow for both.
Current Behavior
The application needs to define all of their own env var names.
Possible Solution
IMO the names for the envvars could be prefixed with ACTIX_ and APPLICATION_ matching the toml, and then the rest of the name being the key in the toml with - -> _ .
Steps to Reproduce (for bugs)
Context
Your Environment
The text was updated successfully, but these errors were encountered:
jayvdb
changed the title
Settings
Settings: Builtin mapping from environment variables
Jan 22, 2024
Expected Behavior
IMO actix-settings should have a default mechanism for overriding all settings from the environment. i.e. it should provide a consistent mapping of its settings to env-var names, so there is a function like 'apply_env(..)' which will read the env and override with any values found there.
Env vars are the more typical approach for overriding settings in a production service, e.g. in k8s. c.f. https://12factor.net/config and many others.
Some people prefer to use config files over envvars, but usually settings systems allow for both.
Current Behavior
The application needs to define all of their own env var names.
Possible Solution
IMO the names for the envvars could be prefixed with
ACTIX_
andAPPLICATION_
matching the toml, and then the rest of the name being the key in the toml with-
->_
.Steps to Reproduce (for bugs)
Context
Your Environment
The text was updated successfully, but these errors were encountered: