Deploying an elixir app

I’m trying to deploy an Elixir/Phoenix app using the instructions here. fly launch fails like this:

Error failed running /usr/local/bin/mix phx.gen.release --docker: exit status 1```

I'm pretty sure this worked at one time. 

We're currently stuck on Phoenix 1.5.13, hoping to be able to upgrade sometime soon.

`flyctl version` shows `flyctl v0.0.335 linux/amd64 Commit: 5be504e BuildDate: 2022-06-21T17:59:29Z`

Is this failure related to a recently upgraded flyctl?

flyctl is calling directly into mix phx.gen.release --docker flyctl/scan.go at 5be504ef71ad38c344916018472cca49b00202af · superfly/flyctl · GitHub, this is the command that’s raising the error

mix phx.gen.release wasn’t added until 1.6.3, I’m not great with GO but I’m not sure if the fly launch command is checking for Phoenix versions < 1.6. Try following this guide Deploy an Elixir Phoenix Application (pre v1.6.3) · Fly Docs to get your rel/ directory files setup for releases with the mix release.init command, and maybe this guide from the Phoenix docs could be helpful as well Deploying on Fly.io — Phoenix v1.6.10

If you folow the here link in my original post, you’ll see that I was, indeed, following those legacy instructions. I have backed off to version 0.0.320, and the problem has gone away, so I’d have to say that 0.0.335 (or maybe somewhat earlier) has broken things for those of use that are still handcuffed to Phoenix < 1.6.3. Would like to see this resolved, or at least documented.

1 Like

Oops, sorry about that! I definitely missed that. Anyway, I opened an issue about it. Hopefully it can get a fix soon. FWIW, from what I can see it seems like your issue is affecting <1.6, not <1.6.3. If you can possibly upgrade to 1.6.0, then it will skip the mix phx.gen.release --docker task and you should be able to follow that legacy guide you linked to.