uber-node / zero-config

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

Update secrets handling #17

Closed sh1mmer closed 9 years ago

sh1mmer commented 9 years ago

This PR makes 3 changes. It is considered a breaking change to the library.

cc @Raynos @lxe @mlmorg @aegarbutt

lxe commented 9 years ago

The loading of secrets.json is restricted to only apply to production environments. Secrets inheritance has been removed to encourage services to keep secrets for different environments fully separate.

According to the code, zero-config still loads secrets-NODE_ENV files, but now it's out of config/secrets directory?

sh1mmer commented 9 years ago

All the secrets files are now in config/secrets not just the secrets/secrets.json file. It does still load secrets-<NODE_ENV>.json files but only when the NODE_ENV is not production.

mlmorg commented 9 years ago

If they're in config/secrets, why not simply use NODE_ENV.json as the filenames?

sh1mmer commented 9 years ago

@mlmorg standard approach.

lxe commented 9 years ago

Well zero-config already uses config/env.json (not config-env.json) why not just do config/secrets/env.json?

lxe commented 9 years ago

Well ok then. :+1:

Raynos commented 9 years ago

lgtm except minor comment. please bump major when cutting version

Raynos commented 9 years ago

lgtm. #shipit

Raynos commented 9 years ago

I'm going to land this and cut a new version.