-
Notifications
You must be signed in to change notification settings - Fork 406
Installing on Heroku
Heroku is a great service that allows you to deploy your Rails apps, like Teambox, on a server with only some simple commands.
Go to Heroku, sign up and and configure your SSH keys and gems.
In order to configure your own copy of Teambox, we’ll clone it locally.
This guide is assuming you use Mac, Linux or any UNIX-like system.
git clone git://github.com/micho/teambox.git
Teambox is now using Bundler, so its easier to setup Heroku with “bamboo-stack”
heroku create --stack bamboo-ree-1.8.7
Your site will be created at http://your-site-name.heroku.com.
Configure Teambox:
Edit config/teambox.yml to set your domain name and email information.
You will need to use S3 uploads, so edit config/amazon_s3.yml with your Amazon S3 keys.
A good service for outgoing email is Sendgrid. You can also use GMail.
If you already have a sendgrid account:
host: smtp.sendgrid.net
username: your@username.com
password: your_password
auth: plain
port: 25
enable_starttls_auto: false
safe_from: true
If you don’t have a sendgrid account, you may want to use Heroku sendgrid add-on:
From the command line:
heroku addons:add sendgrid:free
In your config/teambox.yml
host: smtp.sendgrid.net
username: ENV['SENDGRID_USERNAME']
password: ENV['SENDGRID_PASSWORD']
auth: plain
port: 25
enable_starttls_auto: false
safe_from: true
Gmail will require you to enabled TLS.
enable_starttls_auto: true
By default Teambox use MySQL, edit the Gemfile to bundle PostgreSQL instead.
Change the line:
gem 'mysql'
For:
gem 'pg', :group => :production
gem 'mysql', '~> 2.8.1', :group => :development
You may want to run bundle install to see if everything work correctly
bundle install --without production
make sure its lock
bundle lock
Now we will put the app online. We need to add a plugin to compile CSS stylesheets from SASS and Javascript from Sprockets, because of Heroku’s read-only system. We’ll be using hassle and sprockets_on_heroku plugins.
*hassle has no support for SASS3 style directory structure, so we will be using a fork from thedigitalants
script/plugin install git://github.com/thedigitalants/hassle.git
script/plugin install git://github.com/jeffrydegrande/sprockets_on_heroku.git
git add .
git commit -am "sass and sprockets heroku plugins"
git push heroku master
Now we need to populate the database with the schema.
heroku rake db:auto:migrate
Now you can go to http://your-site-name.heroku.com and start using Teambox!
If you want to update Teambox with the newest version, simply run these:
git pull origin master
git push heroku master