Closed whoward closed 8 years ago
Hi @whoward. DBConnection is very low level and doesn't support any application or system env, it only does explicit keyword list options. Likely you want to open this in ecto where the configuration for url
etc is handled. You may also be interested in https://github.com/phoenixframework/phoenix/issues/1730.
ok i'll move this to ecto - sadly you can't use System.get_env in the configuration file because its 'baked in' at compile time, hence the {:system, "ENV_VAR_NAME"}
pattern's purpose for existing
@whoward do you mean baked in at release build time? This is not quite the same as compile time, as it will work when using mix run
etc.
yeah release build time :) using exrm or distillery
AFAIK ecto supports the {:system, "VAR_NAME"}
idiom for the :url
option since a long time
Discussion moved here: https://groups.google.com/forum/#!topic/elixir-ecto/BiWJvWbUDc0
@michalmuskala this is about doing a similar thing to :url
for :pool_size
It would be great if we could tune the pool size using an environment variable - it doesn't currently seem to work. We can do this with other configuration parameters like
url
in the form of{:system, "ENV_VAR_NAME"}