# Phoenix Deploy Using \`fly launch\`

**URL:** <https://community.fly.io/t/phoenix-deploy-using-fly-launch/4858>\
**Category:** Questions / Help\
**Tags:** elixir\
**Created:** [April 24, 2022, 4:42pm UTC](https://community.fly.io/t/phoenix-deploy-using-fly-launch/4858 "2022-04-24T16:42:33Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![john1](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/john1/32/14672_2.png) [@john1](https://community.fly.io/u/john1)\
**Post date:** [April 24, 2022, 4:42pm UTC](https://community.fly.io/t/phoenix-deploy-using-fly-launch/4858/1 "2022-04-24T16:42:33Z")

</div>

Hi I am trying to deploy my second phoenix app using the cli. The first one went smooth (mostly) but I keep getting this error with what I assume is an updated version of the cli.

I am using this guide:

> **[Getting Started](https://fly.io/docs/elixir/getting-started/)**
>
> Documentation and guides from the team at Fly.io.

```auto
❯ flyctl version
flyctl v0.0.323 darwin/arm64 Commit: c4d6328 BuildDate: 2022-04-24T11:13:19Z

==> Creating release
Release v2 created
Release command detected: this new release will not be available until the command succeeds.

You can detach the terminal anytime without stopping the deployment
==> Release command
Command: /app/bin/migrate
         Starting instance
         Configuring virtual machine
         Pulling container image
         Unpacking image
         Preparing kernel init
         Configuring firecracker
         Preparing to run: `/app/bin/migrate` as nobody
         [0.087338] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100
         [0.088849] Call Trace:
         [0.089104] show_stack+0x52/0x58
         [0.089770] panic+0xfb/0x2bc
         [0.090075] do_exit.cold+0x60/0xb0
         [0.090870] __x64_sys_exit_group+0x18/0x20
         [0.092218] RIP: 0033:0x6fea55
         [0.095954] RDX: 0000000000000fda RBX: 00000000005d0250 RCX: 00000000006fea55
         [0.095954] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000001
         [0.099165] Kernel Offset: disabled
         [0.099539] Rebooting in 1 seconds..
Error Release command failed, deployment aborted

```

Any guidance would be appreciated,

Edit: Using Phoenix 1.6.7

---

<div class="post-metadata">

**Author:** ![greg](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/greg/32/2119_2.png) [@greg](https://community.fly.io/u/greg)\
**Post date:** [April 24, 2022, 8:08pm UTC](https://community.fly.io/t/phoenix-deploy-using-fly-launch/4858/2 "2022-04-24T20:08:49Z")

</div>

Is this in the `lhr` region by any chance? If so, there is an ongoing issue with a host being resolved today

> **[Performance issues in LHR](https://status.flyio.net/incidents/nsgzh15xv7rc)**
>
> Fly.io's Status Page - Performance issues in LHR.

If _not_, not sure. I’ve not seen that error before. Hopefully someone from Fly will be able to assist.

---

<div class="post-metadata">

**Author:** ![john1](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/john1/32/14672_2.png) [@john1](https://community.fly.io/u/john1)\
**Post date:** [April 24, 2022, 8:56pm UTC](https://community.fly.io/t/phoenix-deploy-using-fly-launch/4858/3 "2022-04-24T20:56:09Z")

</div>

I’ve tried ewr(Secaucus) yesterday and miami today with no luck on either

---

<div class="post-metadata">

**Author:** ![john1](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/john1/32/14672_2.png) [@john1](https://community.fly.io/u/john1)\
**Post date:** [April 24, 2022, 9:05pm UTC](https://community.fly.io/t/phoenix-deploy-using-fly-launch/4858/4 "2022-04-24T21:05:52Z")

</div>

~~Works now, that must of been it~~

---

<div class="post-metadata">

**Author:** ![john1](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/john1/32/14672_2.png) [@john1](https://community.fly.io/u/john1)\
**Post date:** [April 24, 2022, 9:14pm UTC](https://community.fly.io/t/phoenix-deploy-using-fly-launch/4858/5 "2022-04-24T21:14:22Z")

</div>

Still getting that on EWR

---

<div class="post-metadata">

**Author:** ![kurt](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/kurt/32/43757_2.png) [@kurt](https://community.fly.io/u/kurt)\
**Post date:** [April 24, 2022, 10:24pm UTC](https://community.fly.io/t/phoenix-deploy-using-fly-launch/4858/6 "2022-04-24T22:24:38Z")

</div>

That error is not the most intuitive, but it might mean there’s no `/app/bin/migrate` file (or it’s not marked as executable). Are you running Docker locally? If you are, you can run:

```auto
docker build . -t my-app
docker run --rm -ti my-app /bin/bash

```

Then `ls -la /app/bin/` and see what’s listed.

Also, was this originally a Phoenix 1.6.7 app, or did you upgrade?

---

<div class="post-metadata">

**Author:** ![john1](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/john1/32/14672_2.png) [@john1](https://community.fly.io/u/john1)\
**Post date:** [April 24, 2022, 11:05pm UTC](https://community.fly.io/t/phoenix-deploy-using-fly-launch/4858/7 "2022-04-24T23:05:15Z")

</div>

> [@kurt](#):
>
> Also, was this originally a Phoenix 1.6.7 app, or did you upgrade?

This was a fresh app I just generated this weekend, always 1.6.7

```auto
nobody@f2d406ca0fbe:/app$ ls -la /app/bin/
total 32
drwxr-xr-x 2 nobody root 4096 Apr 24 22:55 .
drwxr-xr-x 1 nobody root 4096 Apr 24 22:55 ..
-rwxr-xr-x 1 nobody root 87 Apr 24 22:55 server
-rwxr-xr-x 1 nobody root 57 Apr 24 22:55 server.bat
-rwxr-xr-x 1 nobody root 5318 Apr 24 22:55 my_app
-rwxr-xr-x 1 nobody root 6471 Apr 24 22:55 my_app.bat
nobody@f2d406ca0fbe:/app$

```

---

<div class="post-metadata">

**Author:** ![kurt](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/kurt/32/43757_2.png) [@kurt](https://community.fly.io/u/kurt)\
**Post date:** [April 24, 2022, 11:24pm UTC](https://community.fly.io/t/phoenix-deploy-using-fly-launch/4858/8 "2022-04-24T23:24:56Z")

</div>

It looks like it’s missing the migration script. That _should_ get done automatically when you generate the project. Are you sure it’s the generator has been updated phoenix 1.6.7? Last time I tried this I forgot to run `mix archive.install hex phx_new`.

You can try running `mix phx.gen.release --ecto` to see if it generates the `migrate` script.

---

<div class="post-metadata">

**Author:** ![john1](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/john1/32/14672_2.png) [@john1](https://community.fly.io/u/john1)\
**Post date:** [April 24, 2022, 11:35pm UTC](https://community.fly.io/t/phoenix-deploy-using-fly-launch/4858/9 "2022-04-24T23:35:29Z")

</div>

```auto
mix archive.install hex phx_new
....
Found existing entry: /Users/john/.asdf/installs/elixir/1.13.4-otp-24/.mix/archives/phx_new-1.6.7
Are you sure you want to replace it with "phx_new-1.6.7.ez"? [Yn] n

```

> [@kurt](#):
>
> `mix phx.gen.release --ecto`

```auto
See https://hexdocs.pm/mix/Mix.Tasks.Release.html for more information about Elixir releases.

Here are some useful release commands you can run in any release environment:

    # To build a release
    mix release

    # To start your system with the Phoenix server running
    _build/dev/rel/my-app/bin/server

    # To run migrations
    _build/dev/rel/my-app/bin/migrate

```

with `mix release` the migrate file isn’t generated automatically I guess?
