uber-node / zero-config

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

Load config parameters from environment variables via cc.env() #33

Open lxe opened 8 years ago

lxe commented 8 years ago

Add ability to load config from environment variables, like in https://github.com/dominictarr/config-chain example.

Raynos commented 8 years ago

This is avoided by design. favor command line flags over environment variables.

lxe commented 8 years ago

Also CC's env loader doesn't do nested config... Also why do we favor command line parameters over environment variables?

Raynos commented 8 years ago

http://stackoverflow.com/questions/7443366/argument-passing-strategy-environment-variables-vs-command-line

lxe commented 8 years ago

@Raynos the cons...

hard to use correctly because they're visible (delete-able, set-able) from anywhere. If I install a new program that relies on environmental variables, are they going to stomp on my existing ones? Did I inadvertently screw up my environmental variables when I was monkeying around yesterday?

...disappear completely when you use docker. In fact I think all runtime config can be replaced with env variables and passed into the docker containers by the orchestrator.