Allow placeholder values in configuration files #80
Replies: 4 comments 3 replies
-
I don't think that |
Beta Was this translation helpful? Give feedback.
-
Hi @FaveroFerreira, Are you considering setting up an environment variable first directly in the config? |
Beta Was this translation helpful? Give feedback.
-
@kaplanelad I can give some more info, in Rails, you can plug environment variables into config, so for us, this is easily translated to:
Now, config-rs would probably NOT allow for this intermediate -- load + render stage because it wants to read the file itself. This is where we can find a way around it by using something different or finding an API in config-rs that will allow |
Beta Was this translation helpful? Give feedback.
-
@FaveroFerreira FYI your feature request is now implemented. You can do something like |
Beta Was this translation helpful? Give feedback.
-
I took a look at the source code, and looks like
loco
expects us override configurations defined in theconfig-{env}.yaml
with environment variables with an specificAPP__
prefix.Sometimes we do not decide how our environment variables will be named, so we don't get to define them with prefixes like
APP__
It would be nice if we could declare placeholders in our configuration files where the values should be taken from our environment variables.
Example:
Beta Was this translation helpful? Give feedback.
All reactions