Can't run phoenix with elixir 1.9.0 release

so i already set and run :

$ mix phx.gen.secret
REALLY_LONG_SECRET
$ export SECRET_KEY_BASE=REALLY_LONG_SECRET
$ export DATABASE_URL=ecto://USER:PASS@HOST/database
$ mix phx.digest
$ MIX_ENV=prod mix release
   _build/prod/rel/myweebapp/bin/myweebapp start

i don’t know why but i can’t access my phoenix site, i try access :4000, :4001 nothing works, i tried to change http config inside prod.secret.exs, still nothing works

2 Likes

Have you set server: true in your endpoint config?

3 Likes

thankyou !

my gosh, just missing one option, and i didn’t read comment in prod.exs

# ## Using releases (Elixir v1.9+)
#
# If you are doing OTP releases, you need to instruct Phoenix
# to start each relevant endpoint:
#
#     config :wablaster_admin, WablasterAdminWeb.Endpoint, server: true
#
# Then you can assemble a release by calling `mix release`.
# See `mix help release` for more information.
2 Likes