Phoenix 1.5 Endpoint not starting in release

I just updated an application to Phoenix 1.5 following the instructions here: https://gist.github.com/chrismccord/e53e79ef8b34adf5d8122a47db44d22f

Everything works beautifully in development mode, but when I build my (Docker) release the Endpoint doesn’t seem to start correctly, and won’t accept connections. It seems to be running, because if I try to start it I get this:

iex> MyAppWeb.Endpoint.start_link()
{:error, {:already_started, #PID<0.4364.0>}}

I never get the “Running MyAppWeb.Endpoint with cowboy 2.7.0 at 0.0.0.0:4000 (http)” log message, but I also don’t see any errors on startup. I’ve enabled debug logging in the release and didn’t see anything useful there. The release configuration is pretty much identical to a similar app using Phoenix 1.4 that works fine, including the server: true option, port configuration, etc.

Any ideas on how to debug this?

1 Like

Just figured this out after a couple hours of debugging. It was a typo in my releases config. I had configured MyApp.Endpoint instead of MyAppWeb.Endpoint.

6 Likes