Closed kfatehi closed 9 years ago
Personally I think both approaches have their pros and cons and it almost seems like the ideal would be to support both, maybe by simply disabling/reducing the config options if a yaml file exists somehow?
I think that in-app configuration is nice for playing around and tweaking. Strider has been an awesome CD learning tool for our organization and I think we like a little UI still. But yaml config is great when you know what you want and are possibly a little more advanced in your requirements and as we get our 3rd/4th project online I'm starting to see how a drop-in yaml config would be nice.
I think Strider should stick with ENV. Strider is typically deployed in environments like Docker, Heroku, etc which expect you to use environment variables to configure your application.
There are many tools available that you can use to manage your environment, such as foreman and dotenv. Maybe something like this can help if you're finding Strider inconvenient to configure locally.
Multiple competing configuration mechanisms is no good. The goal of such a feature - making the project easy to configure - would be undermined by the complex and contradictory documentation - especially for new users. A number of new edge cases would also be introduced, so we're looking at more bugs and more LOC for them to hide in.
With regards to YAML in general, it feels like a Railsism. The spec is absurdly complex and therefore implementation quality varies dramatically. Some serious security issues have been the result.
YAML does have some really cool features, but they come at too high of a cost. I get the sense that the world is trending toward ENV and JSON, but if not, then at least it is idiomatic in Node.
thanks for your comments guys.
i have to agree regarding Docker and Heroku perpetuating the ENV style.
I suppose that the PaaS or platform that is deploying strider can expose a UI to ENV configuration instead of Strider doing this or resorting to a file style.
Yeah @logankoester, well put.
I know it's not documented anywhere and that's my fault. But Strider config is extremely flexible already because it uses the rc module.
It already supports both JSON and INI file configuration, for example:
Why not go with node-config, which allows for some nice configuration with the ability to override with ENVs.
How do you guys feel about eliminating the whole "configuration through the environment" thing and replace it with a YAML-style approach... e.g. one where we default to a search for /etc/strider/strider.yml or a
-c <path to config yaml file>
option at the command line.