Using Environment Variables with Elixir and Docker
In an existing organization, Docker is a great tool to homogenize your infrastructure. Along with Exrm, I use Docker to run the same code in both the staging and production. In order to connect to different database servers, I use environmental variables to configure the server at run time.
In this blog post, I cover how to load those environmental variables in your config for both your binary and mix tasks.
Read next Phoenix API versioning: URL