views:

67

answers:

2

Let's say you have a project running on apache. I use capistrano to deploy new code and update a httpd.conf/other configuration files, I then reload all of my services (reloading the configs).

How is rollback managed? I wouldn't assume cap rollback would put the old configs in place and reload. Is this possible? Can you show me an example?

Is there a better way of managing configuration?

+1  A: 

Capistrano comes with built-in recipes to manage Rails application rollbacks. They may work for your PHP/Apache deployment...but if they don't you can easily write your own Cap recipies in Ruby. You'll have to try it out on a test server to see how it works.

Jonathan Julian
A: 

I ended up making my own hooks into deploy_code and on_rollback that copied the apache conf from the repository and reloaded apache.

Ken Struys