Programming in Paradise

Wednesday, January 11, 2006

Switchtower Tidbits

Our setup is Apache 2.x on a Linux server. As per my previous post on Switchtower, there are some things which aren't built in. Here are two tasks which appear in my deploy recipes when deploying to the setup described above:

desc "Restart the web server"
task :restart, :roles => :app do
sudo "apachectl graceful"
end

task :after_update_code, :roles => :app do
sudo "chmod a+x #{release_path}/public/dispatch.*"
sudo "chmod -Rf a+x #{release_path}/script/*"
end
The first one replaces the built in restart task with one for apache. The second one chmods the dispatch scripts as well as all of the scripts in the app's script directory. If you are running Lighttpd (either standalone or proxied through Apache) then you don't need the restart task.

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home