I am trying to automate some aspect of deploying a play2/sbt app to a restricted containerized environment, and have some limitation in place.
mainly what I am trying to achieve is to set database config for a specific named db connection only when the env variables are set.
Reading though the HOCON format documentation, I expected that the keys will be ignored if I don't set any of the substitution variables, but that wasn't the case, the app still pickups the somedb connection and tries to connect to it.
I suspect that maybe the db.somedb key is created anyway if there is a child key?
What can I do to have the behavior I am looking for.
please note that creating a separate config file and loading it is not an option for me
db {
somedb.driver = ${?DB_DRIVER}
somedb.url = ${?DB_URL}
somedb.username = ${?DB_USERNAME}
somedb.password = ${?DB_PASSWORD}
}
db.somedb.jndiName=${?DB_JNDI}
thank you