Page MenuHomePhabricator

[WMDE-Fundraising] Create way to configure the application
Closed, ResolvedPublic10 Estimated Story Points

Event Timeline

JeroenDeDauw raised the priority of this task from to Medium.
JeroenDeDauw updated the task description. (Show Details)
JeroenDeDauw set Security to None.
JeroenDeDauw edited a custom field.

After talking to @WMDE-Fisch and @kai.nissen we came to the following conclusions on the following requirements for the configuration:

  1. Configuration data must not be stored in the repo. Instead, we have a configuration template in app/config. The template has the suffix json.dist.
  2. The deployment script checks if a config file exists and if it has the same key structure as the template file. If one of these conditions is not met, the deployment fails.
  3. We'll use JSON as a config format since it is easily parsed without external libraries and has a properly defined format and encoding.
  4. If the configuration values get too complex, we can use the Symfony Config component to validate.

I've done something with https://github.com/wmde/FundraisingFrontend/pull/20 now. Base config at config/config.dist.json. Application merge overrides with config/config.prod.json when present and the tests use config/config.test.json.