uber-node / zero-config

A zero configuration configuration loader
MIT License
116 stars 10 forks source link

Configuration loading should favor production as source of truth #24

Open Raynos opened 9 years ago

Raynos commented 9 years ago

Currently we have

as an a deep extend inheritance tree. where production overwrites common.

It would be a lot easier to reason about our production dependencies if we had

Where production.{dc}.json overwrites production.

To reduce duplication for development and local environments we can have

and

If you have any configurations that are different locally or in development you can turn them off either by changing the value or setting it to null.

This encourages people to treat production.json as the source of truth and to make their local and development environments be as close to production as possible.

To avoid doing NODE_ENV=local in tests, unit tests and when running your application locally we should default NODE_ENV to the string local if it's unset.

jcorbin commented 9 years ago

Big :+1: on this as it will force any prod vs dev differences to be explicit: don't want kafka logging on dev server, okay disable it, but your log file gets written same as prod, instead of using the horrible console -> supervisord -> /different/path/from/prod current status quo.

rajeshsegu commented 9 years ago

+1 Love the idea.

sh1mmer commented 9 years ago

+1 we should definitely do this but it will be potentially dangerous for roll it out so we should actively get people to upgrade when we release this.

Raynos commented 9 years ago

Bump the major or rename/rewrite the entire thing :D

lxe commented 9 years ago

:+1: