How to setup configuration files for different environments?
Written on 8:38 AM by ronald
One problem i am currently facing now during project implementation phase is that there are so many parameters that should be configurable. And for production, staging and development environment there are altogether 3 types of different configuration files. e.g. config.properties.
Previously i was changing values whenever deploying into differnt environment thus there were alot of human mistakes.
After some lookup with fellow developers, i realize that we should have different configuration file for different environments.
e.g.
config-dev.properties
config-staging.properties
config-prod.properties
Using this approach really did reduce the number of human mistakes.
But i personally feel it really isn't a nice approach because if you need to add/remove a new parameter. You got to make the change consistent over all the three properties file.
And imagine if there are also different phases of the project.
I was just wondering if there are other alternative also.
