Skip to content

Instantly share code, notes, and snippets.

@stevoPerisic
Created August 9, 2015 13:24
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stevoPerisic/268fa88d9272064f2aca to your computer and use it in GitHub Desktop.
Save stevoPerisic/268fa88d9272064f2aca to your computer and use it in GitHub Desktop.
Deploying a Meteor App on Heroku
Step by step deploy meteor app to Heroku
1) Run:
$ heroku create [yourappname] --stack cedar --region us --buildpack https://github.com/jordansissel/heroku-buildpack-meteor.git
UPDATE: use this buildpack instead
heroku buildpacks:set https://github.com/AdmitHub/meteor-buildpack-horse.git
UPDATE2: use this build pack to run with iOS and android platforms added
https://github.com/Alveoli/meteor-buildpack-horse
2) Clone the Heroku repo and cd into it:
$ git clone https://git.heroku.com/[yourapp].git && cd [yourapp]
3) Add the MongoLab addon in the Heroku dashboard or in terminal:
$ heroku addons:create mongolab
Must have MONGO_URL configured to be the same like MONGOLAB_URI !!!!
4) Add the ROOT_URL config var and set to https://[yourappname].herokuapp.com/ in dashboard or:
$ heroku config:set ROOT_URL=http://[yourappname].herokuapp.com
5) Run:
$ meteor create [yourappname]
6) Add the new files and folders to the git repo:
$ git add -A .
$ git commit -m"First commit"
7) Update the remote master to Heroku:
$ heroku git:remote -a [yourappname]
8) Push to remote and trigger Heroku build
$ git push heroku master
9) Navigate to https://[yourapp].herokuapp.com/
10) you must have a Procfile and package.json within your meteor app directory
11) To set up email client on Heroku (I chose Mailgun by Mailchimp)
Make sure you set up the MAIL_URL, see http://docs.meteor.com/#/full/email
—————————
to see git status on remote heroku branch run:
$ git remote show heroku
to have a running tail on a heroku app
$ heroku logs -t
—————
METEOR links:
https://gentlenode.com/journal
https://gentlenode.com/journal/meteor
https://gentlenode.com/journal/meteor-5-complete-cheatsheet/7
https://gentlenode.com/journal/meteor-4-best-ressources-to-become-a-master/6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment