News for hackers. Stuff that matters.
Re:Twelve-factor app development on Google Cloud by tybit on Friday November 01, 2019 @02:50AM (#21416698)
Another option is rather than storing configuration in config files, is to store it in code. After experimenting with different approaches, storing configuration in code and switching on a single environment variable ENV (or STAGE or whatever you like to call it) this is probably my favourite.

This doesn't work for everyones infrastructure setups, but it's worked well for mine.

Re:Twelve-factor app development on Google Cloud by icebraining on Friday November 01, 2019 @06:17AM (#21417417)
A file that stores configuration is a configuration file, even if the encoding format happens to be the same as the main programming language and not toml or yaml :)

That works fine if there's a limited number of environments, but it becomes a pain if you're running the same app in too many, or if someone else needs to deploy it independently of the developers.

Re:Twelve-factor app development on Google Cloud by solipsism on Saturday November 02, 2019 @05:09AM (#21426645)
it becomes a pain if you're running the same app in too many,

No it doesn't. It's trivial to generate the full set of configs using a script, if you have too many to manage manually.

or if someone else needs to deploy it independently of the developers

And how exactly do envvars help with that? The set of envvars still needs to get pushed with each deployment. envvars are just a special config file.

Re:Twelve-factor app development on Google Cloud by mixedCase on Friday November 01, 2019 @01:19PM (#21421318)
Convenient enough for dynamic languages. Not so much compiled ones.