Application Configuration
Understand how to effectively configure Elixir applications for production by moving settings to runtime using init callbacks. This lesson covers common pitfalls of static configuration, explores dynamic environment variable usage, and emphasizes configuring processes at runtime for greater flexibility.
We'll cover the following...
A limitation and its solution
Before we discuss upgrading production systems, we should cover application configuration. Most Elixir developers use config/config.exs to configure their applications and dependencies, but remember that Mix loads config/config.exs when building the release. That means environment variables or configuration files we read in config.exs will be available while we build our release, but not in production.
To work around this limitation, many projects like Ecto and Phoenix started to support a special value called {:system, "env"} to allow some dynamic ...