Skip to content

Instantly share code, notes, and snippets.

@coderforhire
Created September 14, 2012 01:05
Show Gist options
  • Save coderforhire/3719146 to your computer and use it in GitHub Desktop.
Save coderforhire/3719146 to your computer and use it in GitHub Desktop.
load 'deploy/assets'
require 'bundler/capistrano'
set :rake, "/usr/local/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 :scm, :git
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none`
set :deploy_to, "/var/www/"
set :branch, "master"
set :copy_cache, true
set :user, "git"
set :scm_passphrase, "asdf"
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
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"
# 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