Open joedevivo opened 10 years ago
You can take a look at stillir for Heroku's far less complete solution to handle configuration from ENV variables.
But yeah, ENV variables are neat because you separate the configuration task from the environment it's running in, and the same values are often needed for multiple applications (or agents) running in similar setups.
Cuttlefish having some support for that could be pretty sweet.
It might be useful to teach Cuttlefish about Environment Variables. That could be in the form of defaults and having a syntax that subs Env vars in the right hand side, the same way we do substitutions.
Maybe something like
some.setting = $[SOME_ENV_VAR]
, which could also be used in a mapping'sdefault
attribute. Although, we may want to avoid doing them in defaults and have an explicit default, and then have another mapping attribute forenv_var
that understands the logic "pull the default form this env var, but if it's not defined, use the value fromdefault
"h/t @ferd for the idea.