Distillery: migration with bin/myapp command

Hello. I am implementing migrations task for deployed release according to this guide https://hexdocs.pm/distillery/running-migrations.html

The problem I encountered is that running bin/myapp command MyApp.ReleaseTasks migrate never returns after performing the migration.

Is this intended behaviour? If so, is there a way I can run a task and return to the shell prompt?

Many thanks,
Alex

1 Like

This is fixed in more recent releases, but you’ll need to add :init.stop() to the end of your migration code, or the VM will not shut down on it’s own, blocking indefinitely.

2 Likes