Mix release works fine, but `_build/prod/rel/myapp/bin/myapp start` just hangs

The command mix release outputs

Release syntax-0.1.0 already exists. Overwrite? [Yn]
* assembling syntax-0.1.0 on MIX_ENV=prod
* using config/releases.exs to configure the release at runtime
* skipping elixir.bat for windows (bin/elixir.bat not found in the Elixir installation)
* skipping iex.bat for windows (bin/iex.bat not found in the Elixir installation)

Release created at _build/prod/rel/syntax!

    # To start your system
    _build/prod/rel/syntax/bin/syntax start

Once the release is running:

    # To connect to it remotely
    _build/prod/rel/syntax/bin/syntax remote

    # To stop it gracefully (you may also send SIGINT/SIGTERM)
    _build/prod/rel/syntax/bin/syntax stop

To list all commands:

    _build/prod/rel/syntax/bin/syntax

_build/prod/rel/myapp/bin/myapp start just hangs

I then starts _build/prod/rel/syntax/bin/syntax start, the command hangs and nothing special happens (no logs, but the server is not started as the website is unavailable).

I don’t have any :releases key in my mix.exs's project function. I don’t have a releases.exs file. I use Elixir 1.9.1 and Phoenix 1.4.9.

Does anyone has a clue of what goes wrong ?

Did you follow https://hexdocs.pm/phoenix/releases.html#content?

Especially the part about configuring the following:
config :my_app, MyApp.Endpoint, server: true

3 Likes

Did you follow Deploying with Releases — Phoenix v1.7.10?

I did not.

I had read this : mix release — Mix v1.16.0, which looked like it was containing the necessary informations :slight_smile:

Thanks for the link

1 Like