Skip to content

Instantly share code, notes, and snippets.

@ncherro
Created May 2, 2012 18:57
Show Gist options
  • Save ncherro/2579243 to your computer and use it in GitHub Desktop.
Save ncherro/2579243 to your computer and use it in GitHub Desktop.
Capistrano deploy overrides for Passenger Standalone - config/deploy.rb
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