Skip to content
This repository
Browse code

* Deprecations and improved documentation all round, also default co…

…nfig/deploy.rb includes a block to nerf and fix the start/stop/restart commands
  • Loading branch information...
commit 146db372b0dc530d901b5ea67f2bbc70f00ea13c 1 parent c840d30
Lee Hambley leehambley authored

Showing 2 changed files with 16 additions and 0 deletions. Show diff stats Hide diff stats

  1. +13 0 bin/capify
  2. +3 0  lib/capistrano/recipes/deploy.rb
13 bin/capify
@@ -54,6 +54,19 @@ role :web, "your web-server here" # Your HTTP server, Apache
54 54 role :app, "your app-server here" # This may be the same as your `Web` server
55 55 role :db, "your primary db-server here", :primary => true # This is where Rails migrations will run
56 56 role :db, "your slave db-server here"
  57 +
  58 +# If you are using Passenger mod_rails uncomment this:
  59 +# if you're still using the script/reapear helper you will need
  60 +# these http://github.com/rails/irs_process_scripts
  61 +
  62 +# namespace :deploy do
  63 +# task :start {}
  64 +# task :stop {}
  65 +# task :restart, :roles => :app, :except => { :no_release => true } do
  66 +# run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}"
  67 +# end
  68 +# end
  69 +
57 70 FILE
58 71 }
59 72
3  lib/capistrano/recipes/deploy.rb
@@ -303,6 +303,7 @@ def try_runner(*args)
303 303 set :use_sudo, false
304 304 DESC
305 305 task :restart, :roles => :app, :except => { :no_release => true } do
  306 + warn "[DEPRECATED] `deploy:restart` is going to be changed to Passenger mod_rails' method after 2.5.9 - see http://is.gd/2BPeA"
306 307 try_runner "#{current_path}/script/process/reaper"
307 308 end
308 309
@@ -483,6 +484,7 @@ def try_runner(*args)
483 484 the :use_sudo variable to false.
484 485 DESC
485 486 task :start, :roles => :app do
  487 + warn "[DEPRECATED] `deploy:start` is going to be removed after 2.5.9 - see http://is.gd/2BPeA"
486 488 run "cd #{current_path} && #{try_runner} nohup script/spin"
487 489 end
488 490
@@ -498,6 +500,7 @@ def try_runner(*args)
498 500 the :use_sudo variable to false.
499 501 DESC
500 502 task :stop, :roles => :app do
  503 + warn "[DEPRECATED] `deploy:start` is going to be removed after 2.5.9 - see http://is.gd/2BPeA"
501 504 run "if [ -f #{current_path}/tmp/pids/dispatch.spawner.pid ]; then #{try_runner} #{current_path}/script/process/reaper -a kill -r dispatch.spawner.pid; fi"
502 505 try_runner "#{current_path}/script/process/reaper -a kill"
503 506 end

0 comments on commit 146db37

Please sign in to comment.
Something went wrong with that request. Please try again.