-->

Monday, June 18, 2012

capistrano deploy and multistage

Just a check list :

cap deploy:setup - use for the first time
cap deploy:check - check that the system is ok and ready for deploy

multi stage example deploy.rb :

set :stages, %w(staging production)
set :default_stage, "staging"
require 'capistrano/ext/multistage'
# since :domain is defined in another file (staging.rb and production.rb),
# we need to delay its assignment until they're loaded
set(:domain) { "#{domain}" }
role(:web) { domain }


And in deploy/staging.rb
set :domain, '111.111.210.211'

set :user, "username"
set :deploy_to, "/home/rubyapps/#{application}"
set :rails_env, "staging"

No comments:

Post a Comment