Sha256: 3df07d5cafa314a206c14e9ea0f34a746977eea9f987c3ca919d351d4b3b1a77
Contents?: true
Size: 1.51 KB
Versions: 1
Compression:
Stored size: 1.51 KB
Contents
Capistrano::Configuration.instance(true).load do namespace :deploy do desc "Stops the phusion passenger server" task :stop, :roles => :web do puts "Stopping rails web server" apache.stop end desc "Starts the phusion passenger server" task :start, :roles => :web do puts "Starting rails web server" apache.start end desc "Restarts the phusion passenger server" task :restart, :roles => :web do puts "Restarting passenger by touching restart.txt" run "touch #{current_path}/tmp/restart.txt" 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
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cap-recipes-0.3.39 | lib/cap_recipes/tasks/passenger/manage.rb |