Is there a possibility to use a local application.conf with Play 1.2.5? Our problem is that different developers have somewhat different setups that we don't want to save to version control.
Alternatives found:
Something else?
Especially, is there a way to tell Play to use custom file name (as "conf/application.conf.local" instead of default "conf/application.conf"?
You can append:
%[email protected]=my_application.conf
At the end of application.conf. One line per developer or environment. You can override some properties in my_application.conf and is not necesary to prepend %my_play_id to the properties changed. For example if you have three developers:
%[email protected]=developer1_conf.conf
%[email protected]=developer2_conf.conf
%[email protected]=developer3_conf.conf
I have looked at the Play! 1.2.5 source code, but find nothing that suggests that Play! would be able to pick up anything other than the file conf/application.conf
.
I just encountered Play 1.x module externalconfig that could help. Seems to work for our purposes. As an extra, this helps to keep production passwords etc out from the VCS.
Note that this module works only within Play's Java code - Play modules implemented in Python (as migrate, for example) won't be aware of external configuration. There might be concerns also with other Java modules that rely on onConfigurationRead()
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With