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

Notes re. twelve factor apps #5

Closed
mozey opened this issue May 13, 2020 · 2 comments
Closed

Notes re. twelve factor apps #5

mozey opened this issue May 13, 2020 · 2 comments

Comments

@mozey
Copy link
Owner

mozey commented May 13, 2020

Mention this in the README

@mozey mozey changed the title Twelve factor app advice re. config Notes re. twelve factor apps Aug 15, 2021
@mozey
Copy link
Owner Author

mozey commented Aug 15, 2021

Mention this in the README

See https://github.com/mozey/config#architecture-notes

@mozey
Copy link
Owner Author

mozey commented Aug 15, 2021

Notes:

it’s easy to mistakenly check in a config file to the repo

sample.config.*.json files must not contain credentials, config.*.json files must be listed in .gitignore/

It's useful to have a list of available configuration options in the repo. This is the sample.* files. Otherwise how would the user quickly know which config options are available (without reading docs)?

there is a tendency for config files to be scattered about in different places and different formats, making it hard to see and manage all the config in one place

config.*.json files (and the samples) must be in the root, i.e. APP_DIR

Further, these formats tend to be language- or framework-specific

Config files must be valid JSON, and have a flat structure, e.g. {KEY: VALUE}

This method does not scale cleanly: as more deploys of the app are created, new environment names are necessary... resulting in a combinatorial explosion of config which makes managing deploys of the app very brittle

Not quite sure I understand what this is getting at... consider next point below

In a twelve-factor app, env vars are granular controls, each fully orthogonal to other env vars

"It's advisable for all config files to have the same keys", see -compare flag usage.

Each key must be unique, and the sample.config.ENV.json file should list an example value (or empty value if not applicable).

@mozey mozey closed this as completed Aug 15, 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

No branches or pull requests

1 participant