This blog post is obsolete, use instead: http://justmeteor.com/blog/deploy-to-production-on-heroku
The case is following, you have made a Meteor application and you want to deploy it on heroku.com. Also, you want to use external MongoDB database provided by mongolab.com.
- Register at https://id.heroku.com/login
- Install Heroku Toolbelt from https://toolbelt.heroku.com
- Register at https://mongolab.com/signup and create new MongoDB database (they give 500MB for free)
- Open the root folder of you Meteor project in console (you need a Git repository in order to deploy applications to Heroku, just set up one or use the one provided by Heroku, it becomes accesible after you create new application)
- Login to the Heroku from the command line: $ heroku login
- Create new Heroku application:
$ heroku create <appname> --stack cedar --buildpack https://github.com/oortcloud/heroku-buildpack-meteorite - Setup other than default MongoDB for your Meteor application (you can get all the details for constructing the MONGO_URL from yours Mongolab account):
$ heroku config:set MONGO_URL=mongodb://<username>:<password>@ds027308.mongolab.com:27308/<dbname> - Set the root URL
$ heroku config:set ROOT_URL=http://<appname>.herokuapp.com - Or this, in case you have got a domain
heroku config:add ROOT_URL=http://yourdomain.com - Add the Heroku Git repository as another remote to your git repository and push the code to that remote. The application will be automatically deployed and becomes accesible on <appname>.herokuapp.com
$ git remote add heroku git@heroku.com:<appname>.git
$ git push heroku master
When you make changes to your code, just run git push heroku master again and all the commit from your origin/master will be released.
In case you want to see the response times for this setup, you can try it out on http://failtracker.com or http://templhub.com
In case you want to see the response times for this setup, you can try it out on http://failtracker.com or http://templhub.com