Comments (5)
@archie Here are a few things:
- You are using both the elixir command and the mix command.
- Can you try this instead?
web: MIX_ENV=prod mix run --no-halt
from heroku-buildpack-elixir.
Yields the same result unfortunately. Here's a longer, but slightly obfuscated log.
2014-07-31T11:15:42+00:00 heroku[slug-compiler]: Slug compilation started
2014-07-31T11:17:07+00:00 heroku[slug-compiler]: Slug compilation finished
2014-07-31T11:17:07.131532+00:00 heroku[api]: Deploy f13bbfe by [email protected]
2014-07-31T11:17:07.131604+00:00 heroku[api]: Release v13 created by [email protected]
2014-07-31T11:17:07.662804+00:00 heroku[web.1]: State changed from up to starting
2014-07-31T11:17:11.028123+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2014-07-31T11:17:13.051232+00:00 heroku[web.1]: Process exited with status 143
2014-07-31T11:17:18.532956+00:00 heroku[web.1]: Starting process with command `MIX_ENV=prod mix run --no-halt`
2014-07-31T11:17:22.247666+00:00 app[web.1]: 11:17:22.244 [info] Application lager started on node nonode@nohost
2014-07-31T11:17:22.247692+00:00 app[web.1]: 11:17:22.244 [info] Application exlager started on node nonode@nohost
2014-07-31T11:17:22.272451+00:00 app[web.1]: 11:17:22.272 [info] Application exlager exited with reason: stopped
2014-07-31T11:17:22.280249+00:00 app[web.1]:
2014-07-31T11:17:22.280253+00:00 app[web.1]: =INFO REPORT==== 31-Jul-2014::11:17:22 ===
2014-07-31T11:17:22.280256+00:00 app[web.1]: exited: stopped
2014-07-31T11:17:22.280255+00:00 app[web.1]: application: lager
2014-07-31T11:17:22.280258+00:00 app[web.1]: type: temporary
2014-07-31T11:17:22.280363+00:00 app[web.1]: =INFO REPORT==== 31-Jul-2014::11:17:22 ===
2014-07-31T11:17:22.280361+00:00 app[web.1]:
2014-07-31T11:17:22.280365+00:00 app[web.1]: application: goldrush
2014-07-31T11:17:22.280366+00:00 app[web.1]: exited: stopped
2014-07-31T11:17:22.280368+00:00 app[web.1]: type: temporary
2014-07-31T11:17:22.280454+00:00 app[web.1]:
2014-07-31T11:17:22.280460+00:00 app[web.1]: application: syntax_tools
2014-07-31T11:17:22.280457+00:00 app[web.1]: =INFO REPORT==== 31-Jul-2014::11:17:22 ===
2014-07-31T11:17:22.280462+00:00 app[web.1]: exited: stopped
2014-07-31T11:17:22.280540+00:00 app[web.1]:
2014-07-31T11:17:22.280543+00:00 app[web.1]: =INFO REPORT==== 31-Jul-2014::11:17:22 ===
2014-07-31T11:17:22.280554+00:00 app[web.1]: type: temporary
2014-07-31T11:17:22.280640+00:00 app[web.1]: =INFO REPORT==== 31-Jul-2014::11:
17:22 ===
2014-07-31T11:17:22.280553+00:00 app[web.1]: exited: stopped
2014-07-31T11:17:22.280637+00:00 app[web.1]:
2014-07-31T11:17:22.280464+00:00 app[web.1]: type: temporary
2014-07-31T11:17:22.280641+00:00 app[web.1]: application: json
2014-07-31T11:17:22.281275+00:00 app[web.1]: application: cowboy
2014-07-31T11:17:22.280643+00:00 app[web.1]: exited: stopped
2014-07-31T11:17:22.281270+00:00 app[web.1]:
2014-07-31T11:17:22.281276+00:00 app[web.1]: exited: stopped
2014-07-31T11:17:22.280644+00:00 app[web.1]: type: temporary
2014-07-31T11:17:22.281922+00:00 app[web.1]:
2014-07-31T11:17:22.281273+00:00 app[web.1]: =INFO REPORT==== 31-Jul-2014::11:17:22 ===
2014-07-31T11:17:22.281372+00:00 app[web.1]:
2014-07-31T11:17:22.281378+00:00 app[web.1]: exited: stopped
2014-07-31T11:17:22.281375+00:00 app[web.1]: =INFO REPORT==== 31-Jul-2014::11:17:22 ===
2014-07-31T11:17:22.281925+00:00 app[web.1]: =INFO REPORT==== 31-Jul-2014::11:17:22 ===
2014-07-31T11:17:22.281377+00:00 app[web.1]: application: cowlib
2014-07-31T11:17:22.281927+00:00 app[web.1]: application: ranch
2014-07-31T11:17:22.296527+00:00 app[web.1]: ** (Mix) Could not start application decimal: could not find application file: decimal.app
2014-07-31T11:17:22.281278+00:00 app[web.1]: type: temporary
2014-07-31T11:17:22.281928+00:00 app[web.1]: exited: stopped
2014-07-31T11:17:22.281380+00:00 app[web.1]: type: temporary
2014-07-31T11:17:22.281930+00:00 app[web.1]: type: temporary
2014-07-31T11:17:22.280551+00:00 app[web.1]: application: compiler
2014-07-31T11:17:23.474925+00:00 heroku[web.1]: Process exited with status 1
2014-07-31T11:17:23.496793+00:00 heroku[web.1]: State changed from starting to crashed
from heroku-buildpack-elixir.
For MogoChat, I use this in lib/mix/tasks/server.ex
defmodule Mix.Tasks.Server do
use Mix.Task
@shortdoc "Start server"
@moduledoc """
Server task.
"""
def run(_) do
:application.ensure_all_started(:mogo_chat)
MogoChat.Router.start
end
end
and then run mix do server, run -no-halt
to start the app. B/w the buildpack already sets MIX_ENV=prod
, so you don't have to set it manually.
Can you try adapting the above changes to your app?
from heroku-buildpack-elixir.
Cool. Adding such a task resolved the problem. I'm still not sure I understand why this happened in the first place though and why adding a server
task works.
Feel free to close the issue if you want. And thanks!
from heroku-buildpack-elixir.
@archie Depends on how your app's supervision tree is. If you add the router to be started by your app supervisor then it'll be started even when you start the mix console. Hence the diff task.
from heroku-buildpack-elixir.
Related Issues (20)
- Is there anyway to add an aditional binary that can be used at compile time. HOT 3
- Support the new Cloud Native Buildpack (CNB) format.
- Will use cached Elixir version even if Erlang version changes HOT 6
- Doesn't work with Heroku-20 Stack HOT 8
- Crypto.app not found HOT 1
- Too many levels of symbolic links HOT 10
- Error building with Heroku-20 stack HOT 5
- Update Readme With Updated Default Versions
- Buildpack incompatible with building in /app HOT 13
- Build isn't marked as failing if errors occur
- Use OTP builds from hexpm/bob HOT 1
- Cache isn't cleared on stack change which results in shared library errors HOT 3
- Can't deploy on Heroku-20, Erlang 23, Elixir 1.12 HOT 1
- libtinfo.so.5 issue with using buildpack HOT 17
- gzip: stdin: not in gzip format HOT 2
- Can't deploy on Heroku-20, Erlang 21.2.5, Elixir 1.12.2 HOT 2
- Support for Stack Heroku-22 HOT 1
- Issues upgrading to Heroku 22 HOT 4
- mix releases should be required (or suggested) for Elixir 1.15
- Deployment of poncho apps
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from heroku-buildpack-elixir.