I have all my configuration set into application.conf which locates under src/main/resources. and it works fine when I run my app in production mode.
val config = ConfigFactory.load()
In some certain situation when I run my app in docker container and I need to override about 30 of properties.
When I add
-Dconfig.file="/etc/deployed.conf"
it excludes all original properties which contains "application.conf" and are not overriden in "deployed.conf".
Is there any way to solve this issue?
Update: Will
val myCfg = ConfigFactory.parseFile(new File("etc/deployed.conf"))
val config = ConfigFactory.load().withFallback(myCfg)
override values in application.conf and will not throw any exception if this file does not exist?
deployed.conftoapplication.confjust to see if there's a convention issue? Also, I'd set the-Dconfig.trace=loadsflag and monitor stderr to see if there any resolution issues. - Yuval Itzchakov