BustByte / coronastatus

Anonymous crowd sourcing of COVID-19 symptoms all over the world (with public data sets)!
MIT License
174 stars 89 forks source link

move config to git in order to make it easier to keep all production … #547

Closed fossecode closed 4 years ago

fossecode commented 4 years ago

…configs up to date, closes #543

Sorry guys, large PR again, but most of the changes are just moving files around.

Maintaining the configs on all the servers is a big pain in the ass, and there are nothing secret or sensitive in the config. We can therefore make it simpler and less fragile by moving the config into the project files (and git).

config.json now only contains

{
  "COUNTRY_CODE": "no"
}

The rest of the config values are stored in app/countrySpecific/xx/config.ts, so that it is easier to keep the server-configs up to date. As they are now .ts-files instead of .json, we get type safety as well.

It is also still possible to override config values with env-variables.

This is the new structure for country specific files: image

michaelmcmillan commented 4 years ago

much better than status quo 👍

fossecode commented 4 years ago

@jkspn Did you look at each commit separately or all together in "Files changed"? I think the stuff you commented on are outdated, check out https://github.com/BustByte/coronastatus/pull/547/files#diff-04c6e90faac2675aa89e2176d2eec7d8R79

jkspn commented 4 years ago

@jkspn Did you look at each commit separately or all together in "Files changed"? I think the stuff you commented on are outdated, check out https://github.com/BustByte/coronastatus/pull/547/files#diff-04c6e90faac2675aa89e2176d2eec7d8R79

My bad! It may have been the outdated file. Checked it again now it's good.