Love your inheritance approach! After using it, I thought this might be even better
Feature description
The issue is .env keys can be overwhelming, I'm often unsure who owns which entry and their purpose, and there is usually a bunch of them that we just don't touch.
Suggest a solution (Optional)
Instead of inheriting only from 1 parent, let us add several together, I'm thinking of
_base_public - these are the default keys provided by the framework we are using
_base_ours - these belong to our organization, our packages etc
_base_secrets - these typically come from 3rd party, e.g. google tokens etc
_base_dev - common keys/values for development
_base_prod - common keys/values for production
- this breaks out the config cleanly
- I don't think my idea is fully baked yet, very open to discussing
- And to deal with duplicate keys, in a list of
_base_*, the later ones should take priority, same as inheritance, child overrides parent
- Also, I think it does not make sense to make parents available to the projects, developers outside the system will only see
prod, stage and dev instead of all the _base_*
- Perhaps we could add another setting called
must inhert/combine, or the opposite exportable
Love your inheritance approach! After using it, I thought this might be even better
Feature description
The issue is
.envkeys can be overwhelming, I'm often unsure who owns which entry and their purpose, and there is usually a bunch of them that we just don't touch.Suggest a solution (Optional)
Instead of inheriting only from 1 parent, let us add several together, I'm thinking of
_base_public- these are the default keys provided by the framework we are using_base_ours- these belong to our organization, our packages etc_base_secrets- these typically come from 3rd party, e.g. google tokens etc_base_dev- common keys/values for development_base_prod- common keys/values for production_base_*, the later ones should take priority, same as inheritance, child overrides parentprod,stageanddevinstead of all the_base_*must inhert/combine, or the oppositeexportable