djstevenson / songs-to-the-siren

A blog about songs
MIT License
0 stars 0 forks source link

Neaten up app config #236

Closed djstevenson closed 4 years ago

djstevenson commented 4 years ago

We have a default config as a Perl struct, with overrides for development/test/etc.

Then we have overrides to that via ENV vars, which is handy for production as we're not checking in secrets to the repo.

I think the ENV thing could be made neater, rather than have a bunch of env vars, have a single one per mode for which the value is JSON data.

OR have a single one across all modes, with a top level JSON key that is the mode (if you see what I mean). Something like

export SONGSTOTHESIREN_CONFIG='{"test":{...}, "development":{...}, ... }'
djstevenson commented 4 years ago

Fixed in PR #237