Created
August 30, 2011 13:09
-
-
Save stravid/1180836 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# RVM bootstrap | |
$:.unshift(File.expand_path('./lib', ENV['rvm_path'])) | |
require 'rvm/capistrano' | |
set :rvm_ruby_string, '1.9.2@shuffler' | |
set :rvm_type, :user | |
# bundler bootstrap | |
require 'bundler/capistrano' | |
unless Capistrano::CLI.ui.agree("Are you sure you want to redeploy? (yes/no): ") | |
puts "Phew! That was a close call." | |
exit | |
end | |
# app info | |
set :application, "fbshuffler" | |
set :repository, "git@github.com:shuffler/fbshuffler.git" | |
# say we're using git | |
set :scm, :git | |
# keep remote copy of check out things | |
set :deploy_via, :remote_cache | |
# keep 5 releases | |
set :keep_releases, 5 | |
after "deploy:update", "deploy:cleanup" # force cleanup after deploy | |
# some SSH things | |
# this forwards the agent which is handy because we have no public repo | |
ssh_options[:forward_agent] = true | |
default_run_options[:pty] = true | |
set :use_sudo, false | |
set :deploy_to, "/home/shuffler/apps/fb" | |
depend :remote, :gem, "bundler" | |
after 'deploy:update_code' do | |
run "cd #{release_path}; RAILS_ENV=production rake assets:precompile" | |
end | |
namespace :deploy do | |
task :start do ; end | |
task :stop do ; end | |
task :restart, :roles => :app, :except => { :no_release => true } do | |
run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}" | |
end | |
end | |
set :domain, "pre.fb.shuffler.fm" | |
server "pre.fb.shuffler", :app, :web, :db, :primary => true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment