Using Dotenvy in Elixir Releases

import Config
import Dotenvy
config :foo,
goalkeeper: env!("GOALKEEPER", :string),
fullback: env!("FULLBACK", :string),
sweeper: env!("SWEEPER", :string)

Including your .envs inside a release

releases: [
myapp: [
include_executables_for: [:unix],
steps: [:assemble, :tar],
overlays: ["envs/"],
path: "_build/rel"
# For local development, read env files inside the envs/ dir;
# for releases, read them at the RELEASE_ROOT
config_dir_prefix = System.fetch_env("RELEASE_ROOT")
|> case do
:error -> "envs/"
{:ok, value} ->
IO.puts("Loading dotenv files from #{value}")
_build/rel/bin/foo start_iexiex> Application.get_env(:foo, :goalkeeper)



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store