Skip to content
Marijn van der Zee edited this page Apr 1, 2014 · 8 revisions

Deploy To Heroku

Warning - the deployment instructions are out of date. Huboard now requires memcached and couchdb. Please help me update the documentation

huboard.com is fully operational and free. If you feel the need to host your own instance please use the latest stable tag. The master branch doesn't always reflect the deployed version on huboard.com and very difficult to support and troubleshoot if you run into any issues.

Sign up on Heroku if you don't have an account, and install the heroku toolbelt

1. Create The Heroku App

Clone Huboard:

git clone https://github.com/rauhryan/huboard.git
cd huboard

Bundle:

bundle install

Create the app:

heroku apps:create ---stack cedar

or, if you'd prefer to name your app yourself:

heroku apps:create <your-app-name> --stack cedar

2. Register App For Github OAuth

Go to https://github.com/settings/applications and register your application to get the application keys needed for OAuth.

  • URL: http://<your-app-name>.herokuapp.com
  • Callback: http://<your-app-name>.herokuapp.com

3. Configure Heroku Environment

Now you'll need to setup some environment variables on Heroku.

Customize your values and run the following from your project root:

heroku config:add \
  GITHUB_CLIENT_ID='<your-github-oauth-client>' \
  GITHUB_SECRET='<your-github-oauth-secret>' \
  SECRET_KEY='<your-random-secret-key>' \
  SESSION_SECRET='<your-complex-session-secret>' 

4. Deploy

git push heroku master

5. Notes after making it work

  1. Create the app in the us (you'll need cloudant which is not available in europe)
heroku apps:create ---stack cedar
  1. Add the following addons to your heroku app (all available in free version)
  • Newrelic
  • Memcachier
  • Cloudant
  1. Add the following environment variables
COUCH_DATABASE:      huboard
COUCH_URL:           <CLOUDANT_URL> # environment variable added with the Cloudant Addon
GITHUB_API_ENDPOINT: https://api.github.com/
GITHUB_CLIENT_ID:    <GITHUB_CLIENT_ID>
GITHUB_SECRET:       <GITHUB_SECRET>
GITHUB_WEB_ENDPOINT: https://github.com/
SECRET_KEY:          <secret_key>
SESSION_SECRET:      <session_secret>
SOCKET_BACKEND:      <http://<appname>.herokuapp.com> # Not 100% that we need this one ...
SOCKET_SECRET:       <socket_secret>

Finally, I made a fork for removing the payment system, and other things that are not necessary... If requested, it is here: https://github.com/copass/huboard

EDIT: setting RACK_ENV to staging will also skip the payment system

My deploy notes

bundle install failed on my OSX Mavericks. So I used

sudo ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future bundle install

for the secret_key and session_key I used a random string

heroku addons:add memcachier
heroku addons:add cloudant
heroku addons:add newrelic

Additional config variables:

heroku config:add \
COUCH_DATABASE='huboard' \
GITHUB_API_ENDPOINT='https://api.github.com/' \
GITHUB_WEB_ENDPOINT='https://github.com/' \
SOCKET_BACKEND='http://serraict-huboard.herokuapp.com' \
SOCKET_SECRET='date|md5' 

Clone this wiki locally