Created
December 7, 2010 10:41
-
-
Save kuon/731662 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
require "bundler/capistrano" | |
set :application, "we-cms" | |
set :repository, "git@github.com:goyman/we-cms.git" | |
set :scm, :git | |
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none` | |
role :web, "we2" # Your HTTP server, Apache/etc | |
role :app, "we2" # This may be the same as your `Web` server | |
role :db, "we2", :primary => true # This is where Rails migrations will run | |
set :deploy_to, "/we/cms" | |
set :user, 'we' | |
set :use_sudo, false | |
pid = "#{deploy_to}/shared/pids/unicorn.pid" | |
namespace :deploy do | |
task :restart do | |
run "cd #{current_path}; [ -f #{pid} ] && kill -TERM `cat #{pid}` ; unicorn_rails -c config/unicorn.rb -E production -D" | |
end | |
desc "Start unicorn server" | |
task :start do | |
run "cd #{current_path} && unicorn_rails -c config/unicorn.rb -E production -D" | |
end | |
desc "Stop unicorn server" | |
task :stop do | |
run "kill -TERM `cat #{pid}" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment