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

Extract common config for all environments #44

Open
estellecomment opened this issue Apr 11, 2022 · 4 comments
Open

Extract common config for all environments #44

estellecomment opened this issue Apr 11, 2022 · 4 comments
Labels
devops enhancement New feature or request P3 Priority 3 web

Comments

@estellecomment
Copy link
Contributor

Your use case

What would you like to do?

Most fields in config are the same in all env (prod and preprod). These fields should live in a single file, and not be repeated in all files (config.preprod.json, config.prod.json), so that there is a single source of truth, and they always stay in sync.

Why would you like to do it?

To avoid having differences appear by mistake between prod and preprod configs.

How would you like to achieve it?

Can we add one config on top of the other, and overwrite some of the fields ?
Or apply configs from two files : one for the common fields, one for the special fields for this env.
Or store a diff of the two files, and apply the diff in the package script.
Or merge the two json files in the package script.
Ask element if they have solved this problem.

Have you considered any alternatives?

No response

Additional context

No response

@celiacheff
Copy link
Contributor

Alternatives:

  • un fichier config.base.json et des config.json qui contiennent que les champs à modifier
  • utiliser le systeme existant de chargement de conf, et avoir un config.json pour tout le monde, plus un config.localhost.json ou autre qui est reconnu par le loader en fonction du nom de domaine

@celiacheff
Copy link
Contributor

celiacheff commented Jul 7, 2022

Cf ici src/vector/getconfig.ts#21

@jdauphant
Copy link
Contributor

Cf ici src/vector/getconfig.ts#21
If we use that, we will need to write or generate the specific file

@celiacheff
Copy link
Contributor

Autre solution proposée par Julien: un moyen de mapper automatiquement les envvar <-> config.

@odelcroi odelcroi added P3 Priority 3 and removed beta - bûcheron 🪓 P2 Priority 2 labels Sep 19, 2022
@odelcroi odelcroi removed the v4 label Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devops enhancement New feature or request P3 Priority 3 web
Projects
None yet
Development

No branches or pull requests

5 participants