Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🎨 config optimisations #7921

Merged
merged 1 commit into from
Feb 2, 2017
Merged

Conversation

kirrg001
Copy link
Contributor

@kirrg001 kirrg001 commented Jan 30, 2017

refs #7488

We have added an ugly fix see https://github.com/TryGhost/Ghost/pull/7493/files.
This PR removes the ugly fix and much more

  • add tests to avoid running into config hierarchy problems again
  • fix config file keys
  • overrides.json is the strongest!
  • argv/env can override any default
  • custom config can override defaults
  • you can now use DEBUG=ghost:config to display all config values on bootstrap

The reviewer should play with config hierarchy a little to ensure i didn't forget a case.

@kirrg001 kirrg001 changed the title 🎨 test config hierarchy and rename nconf file keys [WIP] 🎨 test config hierarchy and rename nconf file keys Jan 30, 2017
@kirrg001 kirrg001 changed the title [WIP] 🎨 test config hierarchy and rename nconf file keys [WIP] 🎨 config optimisations Jan 30, 2017
refs TryGhost#7488

- rename file keys for config files, see https://github.com/TryGhost/Ghost/pull/7493/files
- add tests to avoid running into config hierarchy problems again
- overrides.json is the strongest!
- argv/env can override any default
- custom config can override defaults
- reorganise util functions for config again
@kirrg001 kirrg001 changed the title [WIP] 🎨 config optimisations 🎨 config optimisations Jan 30, 2017
/**
* no channel can override the overrides
*/
nconf.file('overrides', path.join(baseConfigPath, 'overrides.json'));

This comment was marked as abuse.

This comment was marked as abuse.

@ErisDS
Copy link
Member

ErisDS commented Feb 2, 2017

you can now use DEBUG=ghost:config to display all config values on bootstrap

This was super nice for testing 👍 and I think it will be awesome for debugging later as well. Nice!

I have tested a few things with hierarchy of the config and nested values and it all behaves as expected!

@ErisDS ErisDS merged commit 85c0913 into TryGhost:master Feb 2, 2017
@ErisDS ErisDS removed their assignment Jun 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants