Created
July 21, 2009 01:25
-
-
Save jwhitmire/151038 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
set :user, "jeff" | |
set :application, "pdnet" | |
set :repository, "git@github.com:jwhitmire/#{application}.git" | |
set :use_sudo, false | |
set :deploy_to, "/home/#{user}/sites/#{application}" | |
set :scm, "git" | |
set :branch, "master" | |
set :git_shallow_clone, 1 | |
set :deploy_via, :remote_cache | |
set :repository_cache, "cached-copy" | |
set :keep_releases, 3 | |
set :domain, "profdev.jwhitmire.com" | |
server domain, :app, :web | |
role :db, domain, :primary => true | |
namespace :passenger do | |
desc <<-DESC | |
Restarts your application. \ | |
This works by creating an empty `restart.txt` file in the `tmp` folder | |
as requested by Passenger server. | |
DESC | |
task :restart, :roles => :app, :except => { :no_release => true } do | |
run "touch #{current_path}/tmp/restart.txt" | |
end | |
desc <<-DESC | |
Starts the application servers. \ | |
Please note that this task is not supported by Passenger server. | |
DESC | |
task :start, :roles => :app do | |
logger.info ":start task not supported by Passenger server" | |
end | |
desc <<-DESC | |
Stops the application servers. \ | |
Please note that this task is not supported by Passenger server. | |
DESC | |
task :stop, :roles => :app do | |
logger.info ":stop task not supported by Passenger server" | |
end | |
end | |
after "deploy", "deploy:cleanup" | |
namespace :deploy do | |
desc <<-DESC | |
Restarts your application. \ | |
Overwrites default :restart task for Passenger server. | |
DESC | |
task :restart, :roles => :app, :except => { :no_release => true } do | |
passenger.restart | |
end | |
desc <<-DESC | |
Starts the application servers. \ | |
Overwrites default :start task for Passenger server. | |
DESC | |
task :start, :roles => :app do | |
passenger.start | |
end | |
desc <<-DESC | |
Stops the application servers. \ | |
Overwrites default :start task for Passenger server. | |
DESC | |
task :stop, :roles => :app do | |
passenger.stop | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment