Recent site activity

Deploying to Heroku

Heroku (http://heroku.com) is a new platform that makes deployment easy. This document is meant for people that are familiar with Community Engine, git and have read the Heroku docs.


install the heroku gem
sudo gem install heroku

create your community_engine project

rails _2.3.2_ ceheroku -m http://www.communityengine.org/install_template.rb
cd ceheroku

add the gems required by community_engine but not yet installed in heroku
vi .gems

icalendar
calendar_date_select
aws-s3
haml
htmlentities
hpricot
rmagick
desert


git add .gems
git commit -m 'adding .gems'

Tell CE not to autoload assets, since Heroku's read-only file system doesn't allow writes to /public

In your production.rb, add:

config.after_initialize do
  EnginesHelper.autoload_assets = false
end


and commit your changes.

Remove the community_engine submodule lines from .git/config and .gitmodules
vi .gitmodules
vi .git/config

Remove the community_engine
git submodule (submodules are not yet supported on Heroku)
rm -rf vendor/plugins/community_engine/.git*
git rm --cached vendor/plugins/community_engine
git commit -m 'no more ce...'

Set up your CE app to use S3 for file uploads (Heroku doesn't support uploading to the filesystem).

Described in the 'Photo Uploading' section of README.markdown

Tell CE to use the Rmagick processor when thumbnailing uploaded files (in your config/application.yml):

photo:
  ...
  attachment_fu_options:

    ...
    processor: 'rmagick'
 

Add community_engine to your code
git add vendor/plugins/community_engine
git commit -m 'ce back... again'

Send it all to heroku
heroku create
git push heroku master

Tell heroku to load the database
heroku rake db:schema:load

You are now good to go! surf to your heroku provided url.

heroku open


Gotchas:

You'll have to set up smtp through Gmail or some other provider