diff options
| author | mo k <m@mokhan.ca> | 2012-01-14 09:50:00 -0700 |
|---|---|---|
| committer | mo k <m@mokhan.ca> | 2012-01-14 09:50:00 -0700 |
| commit | a0336253d913c411023ec3c118028a2b802115aa (patch) | |
| tree | 2724d324bfa4e9e354f61defb24457eb8a7874f8 | |
| parent | 0cac14037b863ad8c5751cd0ee35451749855f6a (diff) | |
update capistrano deployment to support pushing to staging and prod. 'cap staging deploy' or 'cap production deploy'
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | Gemfile | 1 | ||||
| -rw-r--r-- | Gemfile.lock | 3 | ||||
| -rw-r--r-- | config/deploy.rb | 21 |
4 files changed, 13 insertions, 13 deletions
@@ -7,3 +7,4 @@ public/uploads/ db/sphinx/ log/* .DS_Store +NERD_tree_* @@ -13,6 +13,7 @@ gem 'thinking-sphinx' gem 'fog' gem 'kaminari' gem 'capistrano' +gem 'capistrano-ext' group :development, :test do gem 'webrat' diff --git a/Gemfile.lock b/Gemfile.lock index b94bf139..b67bb487 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -41,6 +41,8 @@ GEM net-sftp (>= 2.0.0) net-ssh (>= 2.0.14) net-ssh-gateway (>= 1.1.0) + capistrano-ext (1.2.1) + capistrano (>= 1.0.0) capybara (1.1.2) mime-types (>= 1.16) nokogiri (>= 1.3.3) @@ -228,6 +230,7 @@ DEPENDENCIES RedCloth bcrypt-ruby capistrano + capistrano-ext capybara carrierwave coffee-rails diff --git a/config/deploy.rb b/config/deploy.rb index f2a2f1e5..52e8ec3e 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -1,26 +1,21 @@ +set :stages, %w(production staging) +set :default_stage, "staging" +require 'capistrano/ext/multistage' + set :application, "www.cakeside.com" -set :repository, "git@cakeartist.unfuddle.com:cakeartist/cake.git" +set :user, "cakeside" +set :use_sudo, false set :scm, :git -# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none` +set :repository, "git@cakeartist.unfuddle.com:cakeartist/cake.git" set :deploy_to, "/home/cakeside/apps/#{application}" - -role :web, "ec2-107-22-93-60.compute-1.amazonaws.com" # Your HTTP server, Apache/etc -role :app, "ec2-107-22-93-60.compute-1.amazonaws.com" # This may be the same as your `Web` server -role :db, "ec2-107-22-93-60.compute-1.amazonaws.com", :primary => true # This is where Rails migrations will run - -set :user, "cakeside" -set :use_sudo, false +set :deploy_via, :remote_cache $:.unshift(File.expand_path('./lib', ENV['rvm_path'])) require "rvm/capistrano" # require 'bundler/capistrano' set :rvm_ruby_string, '1.9.2-p290@cakeside' -# set :rvm_type, :user set :rvm_type, :system -ssh_options[:keys] = [File.join(ENV["HOME"], ".ssh", "amazon-cakeside", "cakeside.pem")] -# if you're still using the script/reaper helper you will need -# these http://github.com/rails/irs_process_scripts namespace :deploy do task :start, :roles => :app do |
