Skip to content

Instantly share code, notes, and snippets.

@jwhitmire
Created July 21, 2009 01:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jwhitmire/151038 to your computer and use it in GitHub Desktop.
Save jwhitmire/151038 to your computer and use it in GitHub Desktop.
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