Skip to content

Combine instead of inherit #43

Description

@bilogic

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

  1. _base_public - these are the default keys provided by the framework we are using
  2. _base_ours - these belong to our organization, our packages etc
  3. _base_secrets - these typically come from 3rd party, e.g. google tokens etc
  4. _base_dev - common keys/values for development
  5. _base_prod - common keys/values for production
  6. this breaks out the config cleanly
  7. I don't think my idea is fully baked yet, very open to discussing
  8. And to deal with duplicate keys, in a list of _base_*, the later ones should take priority, same as inheritance, child overrides parent
  9. 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_*
  10. Perhaps we could add another setting called must inhert/combine, or the opposite exportable

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requestedtype:enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions