I'm trying to deploy a meteor.js app (v 1.0) on heroku using the following buildpack:
https://github.com/AdmitHub/meteor-buildpack-horse
and following along this tutorial:
http://www.growthux.com/ux-html-css-js-growth-hack/installing-meteor-on-heroku
My app is more like a static website, i'm using the database to build a simple back office:
- storing the admin user and image paths which are then dynamically rendered in my templates.
After having created my app on Heroku, set ROOT_URL variable, set the MONGO_URL= variable to my external db on MONGO HQ, (tried mongo lab as well, same problem) and finally push to Heroku, i'm getting this error message when I visit the url:
Application Error
An error occurred in the application and your page could not be served. Please try again in a few moments.
If you are the application owner, check your logs for details.
So I did:
2014-11-10T17:10:23.825922+00:00 heroku[web.1]: Stopping process with SIGKILL 2014-11-10T17:10:23.825723+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2014-11-10T17:10:24.584852+00:00 heroku[web.1]: State changed from starting to crashed 2014-11-10T17:10:24.574995+00:00 heroku[web.1]: Process exited with status 137 2014-11-10T17:10:26.415257+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=cle-meteor.herokuapp.com request_id=ffc312a1-316d-4337-9165-caa492aa7c15 fwd="80.13.242.126" dyno= connect= service= status=503 bytes=
Not sure if I did something wrong regarding the deployment process, or if I must rethink how my app interact with the database when not running locally.
Any insights?
"Application Error" or similar is always caused by your own application code. Routing errors will normally only surface themselves within the logs of your application. In most cases, you will be able to see the cause of the error there. To learn more about logging, please see our Logging article on DevCenter.
Heroku lets you deploy, run and manage applications written in Ruby, Node. js, Java, Python, Clojure, Scala, Go and PHP.
I had a similar issue, it turned out that I'd left off the "http://" from the ROOT_URL.
Your log messages are fairly generic, is there anything before that?
Here's how I got the meteor "todos" app running on heroku and mongolab.
Install meteor
curl install.meteor.com | /bin/sh
Add meteor to our path so we can run the "meteor" command from anywhere.
clone an existing meteor app into the heroku folder.
meteor create --example todos heroku
change to the meteor app's folder.
cd heroku
I added a package.json file that looks like the following.
{
"name": "myapp",
"version": "0.0.1",
"engines": {
"node": "0.10.33",
"npm": "1.4.23"
},
"dependencies": {
"fibers": "1.0.0"
}
}
change to our home folder. We want to come back to our previous spot.
pushd ~
get the heroku client and install it.
wget http://assets.heroku.com/heroku-client/heroku-client.tgz
tar -zxvf heroku-client.tgz
export PATH=${PATH}:${HOME}/heroku-client/bin
Go back to our previous location.
popd
login to heroku.
heroku login
SKIP THIS PART IF YOU ALREADY HAVE SSH CONFIGURED NICELY WITH HEROKU AND GITHUB
Add your public SSH key to heroku (if you haven't already done so)
heroku keys:add ~/keys/heroku_public_key_ssh.txt
(Manually) Ensure that public SSH key has also been added to your GitHub account.
If you're running ssh-agent, ensure your matching private SSH key is loaded
ssh-add ~/.ssh/id_rsa_heroku_github
Set up our subfolder as a git repository, which we will push to heroku. Substitute your own heroku app name for "mikestodos" below.
git init
heroku git:remote -a mikestodos
git add .
git commit -a -m "first deploy"
Create a heroku app. Mine is called mikestodos.
heroku create mikestodos --stack cedar --region us --buildpack https://github.com/AdmitHub/meteor-buildpack-horse.git
Create a new mongolab database, and a new database user as well.
Set the MONGO_URL for heroku to be our MongoLabs database URL. The format is:
heroku config:set MONGO_URL=mongodb://<my_mongouser>:<my_mongodbpassword>@<mymongoserver>:<mymongoport>/<mymongodbname>
substitute your own MongoLabs URL below.
heroku config:set MONGO_URL=mongodb://mikestodos:<dbpassword>@ds051980.mongolab.com:51980/mikestodos
Set the ROOT_URL for our heroku app.
heroku config:set ROOT_URL=http://mikestodos.herokuapp.com
Now push our app to heroku.
git push heroku master
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With