Installation & Deployment Guide: Wheelhouse on Heroku

Deploying to Heroku is one of the quickest and easiest ways to get your Wheelhouse CMS site into production, without having to set up and manage a potentially complex server infrastructure.

This guide assumes that you have a working Wheelhouse setup on your local machine. See the Quick-Start Guide for further details.

1. Create a new Heroku app

The Heroku application must be created on the Cedar stack:

$ heroku create --stack cedar
Creating hollow-spring-1100... done, stack is cedar |

2. Add and configure a MongoDB add-on

One of either the MongoLab or MongoHQ add-ons is required. Choose your package and install it using the heroku addons:add command:

$ heroku addons:add mongolab:starter
-----> Adding mongolab:starter to hollow-spring-1100... done, v2 (free)
Welcome to MongoLab.

Once added, edit config/wheelhouse.yml to use the MongoDB URI for your chosen add-on:

database: wheelhouse-demo
host: localhost
port: '27017'
production: <%= ENV['MONGOLAB_URI'] %>

3. Configure the web server process to use Thin

Rails on Heroku uses Webrick by default but performance will be improved by using the Thin web server instead. First add the thin gem to your Gemfile:

gem 'thin'

Then create a file named Procfile in the root of your Rails application containing:

web: bundle exec rails server thin -p $PORT

4. Configure Amazon S3

If you plan to use the Media Library capabilities of Wheelhouse CMS, you will first need to create a new bucket within your Amazon S3 account for media file storage. Then add the dragonfly-s3_data_store gem to your Gemfile:

gem 'dragonfly-s3_data_store'

Add your S3 configuration to Heroku:

$ heroku config:add S3_KEY=8N029N81 S3_SECRET=9s83109d3+583493190
Adding config vars:
  S3_KEY    => 8N029N81
  S3_SECRET => 9s83109d3+583493190
Restarting app...done.

Finally, create an initializer with your Amazon S3 configuration in config/initializers/media.rb:

Wheelhouse::Media.configure_s3 do |c|
c.bucket_name = "wheelhouse-demo"
c.access_key_id = ENV["S3_KEY"]
c.secret_access_key = ENV["S3_SECRET"]

# If using a region other than us-east-1
# c.region = "us-west-2"

5. Push to Heroku

Ensure your files are committed. Then git push to heroku:

git push heroku master

6. Run the Wheelhouse setup process

Browse to your Heroku app URL to set up your site and an initial admin user.

Additional Heroku Resources