We have a configuration database instead of environment vars. This is what I ended up doing:
use Mix.Config
Mix.Task.run "loadpaths"
{:ok, _} = Application.ensure_all_started(:config_db)
config :indexer_spike, Repo,
adapter: Ecto.Adapters.Postgres,
database: ConfigDb.get!("/postgresql/database")
So then our builder server can build a single Docker image that can be run in any environment via mix run --no-halt
.