Skip to content

Commit

Permalink
Support Passenger Standalone mode
Browse files Browse the repository at this point in the history
  • Loading branch information
El Matou authored and nesquena committed Jan 14, 2012
1 parent 1b91a2a commit 064a28c
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions lib/cap_recipes/tasks/passenger/manage.rb
Expand Up @@ -20,4 +20,35 @@
end

end

namespace :passenger do

desc "Standalone mode for passenger"
namespace :standalone do

desc "Starts the standalone passenger server"
task :start do
run "cd #{current_path} && passenger start -a 127.0.0.1 -p 3000 -d -e #{stage_or_production}"
end

desc "Stops the standalone passenger server"
task :stop do
run "cd #{current_path} && passenger stop"
end

desc "Restarts the standalone passenger server"
task :restart, :roles => :app, :except => { :no_release => true } do
run "cd #{current_path} && passenger stop"
run "cd #{current_path} && passenger start -a 127.0.0.1 -p 3000 -d -e #{stage_or_production}"
end

end

end
# ===============================================================
# Support for capistrano-ext
# ===============================================================
def stage_or_production
exists?(:stage) ? stage : "production"
end
end

0 comments on commit 064a28c

Please sign in to comment.