From 146db372b0dc530d901b5ea67f2bbc70f00ea13c Mon Sep 17 00:00:00 2001 From: Lee Hambley Date: Thu, 27 Aug 2009 14:24:53 +0100 Subject: [PATCH] * Deprecations and improved documentation all round, also default config/deploy.rb includes a block to nerf and fix the start/stop/restart commands --- bin/capify | 13 +++++++++++++ lib/capistrano/recipes/deploy.rb | 3 +++ 2 files changed, 16 insertions(+) diff --git a/bin/capify b/bin/capify index 2a3de7aa0..e27100a02 100755 --- a/bin/capify +++ b/bin/capify @@ -54,6 +54,19 @@ role :web, "your web-server here" # Your HTTP server, Apache role :app, "your app-server here" # This may be the same as your `Web` server role :db, "your primary db-server here", :primary => true # This is where Rails migrations will run role :db, "your slave db-server here" + +# If you are using Passenger mod_rails uncomment this: +# if you're still using the script/reapear helper you will need +# these http://github.com/rails/irs_process_scripts + +# namespace :deploy do +# task :start {} +# task :stop {} +# task :restart, :roles => :app, :except => { :no_release => true } do +# run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}" +# end +# end + FILE } diff --git a/lib/capistrano/recipes/deploy.rb b/lib/capistrano/recipes/deploy.rb index 61cd9148b..6dbe2042f 100644 --- a/lib/capistrano/recipes/deploy.rb +++ b/lib/capistrano/recipes/deploy.rb @@ -303,6 +303,7 @@ def try_runner(*args) set :use_sudo, false DESC task :restart, :roles => :app, :except => { :no_release => true } do + warn "[DEPRECATED] `deploy:restart` is going to be changed to Passenger mod_rails' method after 2.5.9 - see http://is.gd/2BPeA" try_runner "#{current_path}/script/process/reaper" end @@ -483,6 +484,7 @@ def try_runner(*args) the :use_sudo variable to false. DESC task :start, :roles => :app do + warn "[DEPRECATED] `deploy:start` is going to be removed after 2.5.9 - see http://is.gd/2BPeA" run "cd #{current_path} && #{try_runner} nohup script/spin" end @@ -498,6 +500,7 @@ def try_runner(*args) the :use_sudo variable to false. DESC task :stop, :roles => :app do + warn "[DEPRECATED] `deploy:start` is going to be removed after 2.5.9 - see http://is.gd/2BPeA" 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" try_runner "#{current_path}/script/process/reaper -a kill" end