I’m wondering what best-practices are for sharing configuration options between multiple applications under an umbrella app. However, I feel like this risks the modular independency and can make apps dangerously dependent on one another.
Create a “helper” app inside the umbrella for “business-wide” code (e.g. mix tasks) that could also provide a namespace for “global” config options such as the number of results returned per page in a paginated result set. In our umbrella’s config, we could reference config values using our helper app’s namespace:
config :helper, per_page: 20
And reference it in our other apps, e.g.
Use environment variables.
Does anyone see any advantage one way or the other? Or are we looking at this the wrong way? Any input appreciated!