distillery - Do Ecto migration from a release of an elixir app -
i've made release of elixir application.
starts run supervised task using db when app lunched.
when db not migrated, task keep error , app terminated.
i read http://blog.firstiwaslike.com/elixir-deployments-with-distillery-running-ecto-migrations/, https://hexdocs.pm/distillery/running-migrations.html, , tried implement migration function following them, failed because app needs started load config of app , make command terminated.
when run application.get_all_env(:my_app)
without start app, returns empty list []
. there anyway run ecto.migrator.run(myapp.repo, path, :up, all: true)
without start app?
it enough load application application.load(:my_app)
have access env - doesn't need started.
a detailed guide on running migrations releases available in distillery documentation.
Comments
Post a Comment