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
stagingandproductionintoconfig/deploy/staging.rbandconfig/deploy/production.rbrespectively. - 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
