How to do Staging with Brightbox gem

The brightbox gem supports the multistage features of Capistrano.

If you add:

require 'capistrano/ext/multistage'

to the top of your config/deploy.rb file you will have staging support.

Using multistage

  • Factor out the differences between staging and production into config/deploy/staging.rb and config/deploy/production.rb respectively.
  • Run capistrano with the stage you want to execute:
    cap staging deploy

Example staging.rb

set  :branch,  'staging'
set  :rails_env,   'staging'
set  :domain, "staging.myapp.mydomain.com"

server "staging.myapp.mydomain.com", :app, :web, :db, :primary => true
docs/gemv2/staging.txt · Last modified: 2009/05/08 18:05 (external edit)