There has been a couple discussions on the topic either here or on the
issues tracker.

The consensus is that this problem needs to be solved but we are not quite
sure how. The only way to support {:system, "DATABASE_URL"} in a way that
it would also work for Erlang applications is by hijacking the application
controller using private APIs. We could also try solve this exclusively for
Elixir but then there would be gaps where it wouldn't be supported.

Ecto 2.1 is trying a new approach where the value is configured using a
repository callback, that's what we will try to do when Phoenix 1.3 comes
out and see where it will lead us to.



*José Valim*
www.plataformatec.com.br
Skype: jv.ptec
Founder and Director of R&D

On Sat, Dec 17, 2016 at 1:48 AM, Cory ODaniel <c...@coryodaniel.com> wrote:

> I've definitely run into issues where I need to pass an environment
> variable at run time, but an application that I use doesn't support the
> {:system, "DATABASE_URL"} or {:system, "PORT"} style environment variables
> that Ecto and Phoenix support.
>
> I'm curious if it would be beneficial to add support in
> Application.get_env/2 that when the value that returns matches {:system,
> var} then System.get_env(var) would be called under the hood.
>
> --
> You received this message because you are subscribed to the Google Groups
> "elixir-lang-core" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to elixir-lang-core+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/elixir-lang-core/9fd6e998-04d2-4d7d-87ee-
> 34abb16ee779%40googlegroups.com
> <https://groups.google.com/d/msgid/elixir-lang-core/9fd6e998-04d2-4d7d-87ee-34abb16ee779%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elixir-lang-core+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4%2BOpmZ%3Ds3b2OvAH0chC9wwGL2HrRCB1v2ymbcjOzSc4BA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to