X-Git-Url: https://git.njae.me.uk/?a=blobdiff_plain;f=config%2Fdeploy.rb;h=182ca5dcd2c2475bb180b83bd2dd31eca3a6e09b;hb=bf9f26790711c76f1c57b70d02a7276db14d1351;hp=455718df1cfe56be0b40d544e3741fce48347b6a;hpb=05c481a0756c1fa0a9956b21a912de2c10914ef2;p=depot.git diff --git a/config/deploy.rb b/config/deploy.rb index 455718d..182ca5d 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -27,13 +27,31 @@ task :configure_database, :roles => :app do end # Define the user for running and stopping server sub-proceses (Mongrel, etc.) -# set :runner, :user +set :runner, :neil -# As we're not running any other server processes (FastCGI, Mongrel, etc.), -# we don't need to start and stop them. +## As we're not running any other server processes (FastCGI, Mongrel, etc.), +## we don't need to start and stop them. +#namespace :deploy do +# [:start, :stop, :restart].each do |t| +# desc "#{t} task is a no-op with mod_rails" +# task t, :roles => :app do ; end +# end +#end + +# Custom tasks for starting and restarting Mongrel cluster namespace :deploy do - [:start, :stop, :restart].each do |t| - desc "#{t} task is a no-op with mod_rails" - task t, :roles => :app do ; end + desc "start the mongrel cluster" + task :start, :roles => :app do + sudo "/usr/bin/mongrel_cluster_ctl start" + end + + desc "stop the mongrel cluster" + task :stop, :roles => :app do + sudo "/usr/bin/mongrel_cluster_ctl stop" end -end \ No newline at end of file + + desc "restart the mongrel cluster" + task :restart, :roles => :app do + sudo "/usr/bin/mongrel_cluster_ctl restart" + end +end