I've made a release of my elixir application.
It starts to run a supervised task using DB when the app is lunched.
When the DB is not migrated, the task keep error and app is terminated.
I read http://blog.firstiwaslike.com/elixir-deployments-with-distillery-running-ecto-migrations/, https://hexdocs.pm/distillery/running-migrations.html, and tried to implement migration function following them, but failed because the app needs to be started to load config of the app and it make the command terminated.
When I run Application.get_all_env(:my_app)
without start my app, it returns empty list []
.
Is there anyway to run Ecto.Migrator.run(MyApp.Repo, path, :up, all: true)
without start the app?