Following the setup instructions, I have the following Ecto configuration in my config/config.exs
file :
config :my_app, MyApp.Repo,
adapter: Ecto.Adapters.Postgres,
url: "postgresql://postgres@localhost/myrepo",
size: 20
If my understanding is correct, the config.exs
is evaluated at compile-time.
Is there a way to do this configuration step at runtime ?
This is for an app which will be distributed as a compiled binary (via exrm
). The end-user should be able to customize the database url and pool size via flags or environment variables, not by editing sys.config