Created
September 26, 2012 14:00
-
-
Save coderforhire/3788230 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
require 'bundler/capistrano' | |
require "rvm/capistrano" # Load RVM's capistrano plugin. | |
require "capistrano-resque" | |
set :rake, "/home/git/.rvm/gems/ruby-1.9.3-p194@global/bin/rake" | |
set :application, "Cloud Poker Database" | |
set :repository, "ssh://git@50.56.174.223/home/git/cloud_poker_db_source/" | |
set :default_enviroment, { | |
'PATH' => "/home/git/.rvm/rubies/ruby-1.9.3-p194/bin/ruby", | |
'BUNDLE_PATH' => "/home/git/.rvm/gems/ruby-1.9.3-p194@global/bin/bundle" | |
} | |
set :scm, :git | |
set :deploy_to, "/var/www/" | |
set :branch, "master" | |
set :copy_cache, true | |
set :user, "git" | |
set :scm_passphrase, "password" | |
role :web, "50.56.174.223" # Your HTTP server, Apache/etc | |
role :app, "50.56.174.223" # This may be the same as your `Web` server | |
role :db, "50.56.174.223", :primary => true # This is where Rails migrations will run | |
role :resque_worker, "cloudpokerdb.com" | |
role :resque_scheduler, "cloudpokerdb.com" | |
set :workers, { "my_queue_name" => 2 } | |
default_run_options[:pty] = true | |
namespace :deploy do | |
desc "Redefine deploy:restart" | |
task :restart, :roles => :app do | |
invoke_command "sudo service nginx restart", :via => run_method | |
end | |
end | |
after "deploy", "deploy:restart", "resque:restart" | |
# If you are using Passenger mod_rails uncomment this: | |
# if you're still using the script/reapear helper you will need | |
# these http://github.com/rails/irs_process_scripts | |
# namespace :deploy do | |
# task :start {} | |
# task :stop {} | |
# task :restart, :roles => :app, :except => { :no_release => true } do | |
# run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}" | |
# end | |
# end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment