Created
May 2, 2012 18:57
-
-
Save ncherro/2579243 to your computer and use it in GitHub Desktop.
Capistrano deploy overrides for Passenger Standalone - config/deploy.rb
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 :standalone_port, 3000 | |
namespace :deploy do | |
task :start do | |
run "cd #{latest_release} && RAILS_ENV=#{rails_env} passenger start -p #{standalone_port} -d" | |
end | |
task :stop do | |
run "cd #{latest_release} && RAILS_ENV=#{rails_env} passenger stop" | |
end | |
task :restart, :roles => :app, :except => { :no_release => true } do | |
run "touch #{File.join(latest_release, 'tmp', 'restart.txt')}" | |
run "cd #{latest_release} && RAILS_ENV=#{rails_env} passenger stop; RAILS_ENV=#{rails_env} passenger start -p #{standalone_port} -d" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment