Skip to content

Instantly share code, notes, and snippets.

@stursby
Last active September 23, 2015 14:54
Show Gist options
  • Save stursby/5b05b5cc3c240dd67b42 to your computer and use it in GitHub Desktop.
Save stursby/5b05b5cc3c240dd67b42 to your computer and use it in GitHub Desktop.
Deploy Meteor to Heroku

Create remote staging branch with custom name "my-app-name". This will become my-app-name.herokuapp.com

heroku create my-app-name --remote staging

Add the Meteor build pack Meteor Buildpack Horse

heroku buildpacks:set https://github.com/AdmitHub/meteor-buildpack-horse.git

Add Mongolab Herkou addon.

heroku addons:create mongolab

By default, Heroku will set the ENV var of MONGOLAB_URI to the Mongolab connection. Login to your Heroku dashboard and navigate to the Settings section and change MONGOLAB_URI to MONGO_URL.

vars

Add session affinity for sticky sessions

heroku labs:enable http-session-affinity

Add the correct ENV variables

heroku config:set ROOT_URL=https://<yourapp>.herokuapp.com

Push to Heroku! (notice, we're using the staging branch). Grab a coffee... this will take a few min!

git push staging master

If everything went according to plan, you can now see you live app by running the following:

heroku open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment