Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* 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
leehambley committed Aug 27, 2009
1 parent c840d30 commit 146db37
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
13 changes: 13 additions & 0 deletions bin/capify
Expand Up @@ -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
}

Expand Down
3 changes: 3 additions & 0 deletions lib/capistrano/recipes/deploy.rb
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand All @@ -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
Expand Down

0 comments on commit 146db37

Please sign in to comment.