imetallica

imetallica

Deploy on Heroku fails

Hi, I’m trying to deploy on heroku my app without luck. I’ve followed the phoenix documentation but it doesn’t work.

This is the relevant part of my prod.exs file:

config :app_core, AppCoreWeb.Endpoint,
  force_ssl: [rewrite_on: [:x_forwarded_proto]],
  server: true,
  cache_static_manifest: "priv/static/cache_manifest.json",
  url: [host: System.get_env("HOST"), scheme: "https", port: 443],
  secret_key_base: secret_key_base

This is my Procfile:

web: MIX_ENV=prod mix do ecto.migrate, phx.server

This is the error I’m getting:

2019-06-21T19:03:47.553727+00:00 heroku[web.1]: Starting process with command `MIX_ENV=prod mix do ecto.migrate, phx.server`
2019-06-21T19:03:50.926636+00:00 app[web.1]: 
2019-06-21T19:03:50.926665+00:00 app[web.1]: 19:03:50.926 [info]  Already up
2019-06-21T19:03:51.223866+00:00 app[web.1]: 19:03:51.223 [info] Access AppCoreWeb.Endpoint at https://app-core.herokuapp.com
2019-06-21T19:03:37.402509+00:00 heroku[web.1]: State changed from starting to crashed
2019-06-21T19:03:37.407991+00:00 heroku[web.1]: State changed from crashed to starting
2019-06-21T19:03:37.297838+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2019-06-21T19:03:37.297929+00:00 heroku[web.1]: Stopping process with SIGKILL
2019-06-21T19:03:37.377379+00:00 heroku[web.1]: Process exited with status 137

Marked As Solved

idi527

idi527

:wave:

There should be a http: [...] or https: [...] option set somewhere for you endpoint config.

config :app_core, AppCoreWeb.Endpoint,
  force_ssl: [rewrite_on: [:x_forwarded_proto]],
  server: true,
  cache_static_manifest: "priv/static/cache_manifest.json",
  url: [host: System.get_env("HOST"), scheme: "https", port: 443],
  secret_key_base: secret_key_base,
  http: [:inet6, port: System.get_env("PORT")] # <--- for example

Where Next?

Popular in Questions Top

openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
myronmarston
The Elixir Typespec docs show the following syntax for keyword lists in typespecs: # ... | [key: type] # keyword lis...
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
LegitStack
I’m trying to make a websocket server in Phoenix or raw Elixir. I heard about gun, I think I could use cowboy, but since I’m not that sma...
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
chewm
Hi guys, nice to meet you to the whole forum, I’m new here, I’m trying to configure visual studio code for elixir, right now the intellis...
New
sabri
Can someone explain the settings of pool_size of Ecto in config file? and what is the recommend size? Thanks
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New

Other popular topics Top

shahryarjb
Hello, I get Persian date from my client and convert it to normal calendar like this: def jalali_string_to_miladi_english_number(persi...
New
William
I would like to know that is there any online source for learning Phoenix Framework for building E-Commerce Store? Any advantage on build...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
_russellb
I want to try my hand at web scraping. What tools/libraries do I need to use. I’m hoping to turn this into something professional so don’...
New
malloryerik
Hi, this is for people who, like me, have had some friction using .html.heex templates in VSCode. The solution seems to be, in a hyphena...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
chrismccord
This release brings a number of exciting features, including integration with the new Phoenix LiveDashboard and Phoenix LiveView. There h...
New
qwerescape
Is there a way to get the call stack or stack trace at any point in the code? Not from exceptions, but an expression that returns how the...
New
msaraiva
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
564 42633 214
New
aesmail
Hello guys, I have finally made it. I created an admin interface for a framework. It’s been on my todo list for years and with the curre...
New

We're in Beta

About us Mission Statement