Skip to content

How to deploy to Heroku

rodowi edited this page Sep 20, 2014 · 13 revisions
  1. First go to Heroku and create a new app (e.g.: example-democracyos) containing an instance of MongoHQ.
  2. Go to the app dashboard settings in https://dashboard.heroku.com/apps/example-democracyos/settings and copy the Git URL. In this case, it's [email protected]:example-democracyos.git
  3. Add this as a remote in your app directory with the command git remote add heroku [email protected]:example-democracyos.git. You can name it whatever you want: git remote add whatever [email protected]:example-democracyos.git.
  4. Add the config variables needed for the app to work using heroku config:set VAR_NAME=VALUE VAR_NAME2=VALUE2 etc.
  5. Push the code with git push heroku master. Always push to the heroku's master branch for the changes to take effect.

The app should be running

TL;DR (or I'll do it from the command line)

➜  eg git:(master) heroku apps:create example-democracyos
➜  eg git:(master) heroku addons:add mongohq:sandbox
➜  eg git:(master) heroku config:set MONGO_URL=`heroku config:get MONGOHQ_URL`
➜  eg git:(master) heroku addons:add mandrill:starter
➜  eg git:(master) heroku config:set NODE_ENV=production NODE_PATH=.

IF version >= 0.7.6

➜  eg git:(master) heroku config:set GITHUB_USERNAME=rodowi GITHUB_PASSWORD=31337