-
Notifications
You must be signed in to change notification settings - Fork 142
Deploy on Heroku
tagliala edited this page Dec 15, 2012
·
50 revisions
A fast guide on how to deploy icare on heroku
- git: http://git-scm.com/
- Heroku Toolbelt: https://toolbelt.heroku.com/
- Working Facebook Application: Setup-Facebook-App
Replace appname
with a name of your choice.
- Setup a new application
heroku create appname --remote production
- Enable branch tracking
git config push.default tracking
- Add add-ons
heroku addons:add mongolab:starter
heroku addons:add redistogo:nano
- Add plugins
heroku labs:enable user-env-compile
- Setup environment variables
heroku config:add APP_BASE_URL=appname.herokuapp.com
heroku config:add SECRET_TOKEN=xxx
heroku config:add FACEBOOK_NAMESPACE=xxx
heroku config:add FACEBOOK_APP_ID=xxx
heroku config:add FACEBOOK_SECRET=xxx
- Setup Google Analytics (optional)
heroku config:add GOOGLE_ANALYTICS_ID=UA-XXXXXXXX-X
- Push!
git checkout master
git push production master
- Create db indexes and populate db with some default objects
heroku run rake db:mongoid:create_indexes db:seed
- Set up to track remote branch production/master from master. In this way you can simply launch
git push
from master branch instead ofgit push production master
to deploy on heroku
git branch --set-upstream master production/master
Replace appname
with the name of the existing application. We suppose you already have forked this repository.
- Add the heroku remote
heroku git:remote -a appname -r production
- Enable branch tracking
git config push.default tracking
- After pushing for the first time to production master, set up to track remote branch production/master from master
git branch --set-upstream master production/master
On free Heroku hosting, the "Share on Facebook Timeline" will use a background worker inside the web dyno, by using defunkt/unicorn and the following instructions from Diaspora