I'm trying to allow users to set configuration through environment variables (specially helpful in dockerized environments) but the library doesn't pick up the values I'm setting.
Before, we were using System Properties (e.g. -Drpc.providers.web.http.bind_address=hostname) and it worked just fine.
Then I tried setting the same configuration through environment variables and reading it with the following:
When I call config.getString("rpc.providers.web.http.bind_address") I don't get the value of my environment variable, but the default value I had in baseProperties.The library seems to fail to detect nested properties as seen in the debugger:
I'm guessing there might be an assumption that env vars can't have dots in them, but I haven't had the time to check the code yet.
I'm trying to allow users to set configuration through environment variables (specially helpful in dockerized environments) but the library doesn't pick up the values I'm setting.
Before, we were using System Properties (e.g.
-Drpc.providers.web.http.bind_address=hostname
) and it worked just fine.Then I tried setting the same configuration through environment variables and reading it with the following:
When I call
config.getString("rpc.providers.web.http.bind_address")
I don't get the value of my environment variable, but the default value I had inbaseProperties
.The library seems to fail to detect nested properties as seen in the debugger:I'm guessing there might be an assumption that env vars can't have dots in them, but I haven't had the time to check the code yet.
I'm using
com.typesafe:config:1.3.1
.Thanks!