Running migrations and other Mix tasks with Distillery release

I tried setting up Edeliver, but am hitting some issues that make it appear unworkable for my use case. I have a single CI server whose environment is identical to my staging server, the environment is not SSH-accessible, and Edeliver doesn’t support just running the build locally. Additionally, when attempting to just use its deployment/migration functionality without using it for builds, I’m encountering errors in how the shell scripts run on my environment. I’ll likely get around to filing issues, but at this point I’m getting to grips with lots of moving parts in this setup.

So instead of getting the more complicated Distillery+Edeliver combination working, I thought I’d try just Distillery. Currently I’m just using Distillery to build the release tarball, scping it to staging, untarring, and restarting the server via SSH.

What this misses, though, are migrations. There are lots of commands available in Distillery’s startup script, and I imagine some of them can facilitate migrations, but I don’t know what those might be. The tutorials I’ve read do a great job of describing releases and upgrades, but not of migrations.

Thanks.

1 Like

I’ve been using the setup described here http://blog.firstiwaslike.com/elixir-deployments-with-distillery-running-ecto-migrations/

4 Likes