I'd probably suggest two separate capistrano calls with different stage definitions (using something like the multistage extension).
If you do this kind of deploy frequently, you could then wrap the cap calls in a rake task, e.g. "rake deploy_all" would call "cap first deploy" and "cap second deploy". That's the easy way. The hard way is figuring out how to reset the variables that Capistrano cached on the first deploy, so they get reevaluated on the second. People have done this, so it is possible, but I don't recommend it. Too fiddly, for one, and fragile, since it depends on Capistrano internals that are not guaranteed to remain unchanged. Of course, the _third_ option is to just write your own tasks from the ground up, based on the assumption that a deploy can occur to multiple different targets on the servers. This is actually not hard to do, since you don't need to worry about all the special cases that Capistrano does, if you're writing it for you. Don't worry about all the SCM helpers and deployment strategies, just write the tasks to run the exact commands you need to run. You could probably do the whole thing in just a handful of simple tasks. Fewer, even. - Jamis On 2/4/09 10:08 AM, [email protected] wrote: > I'm trying to deploy a rails site to two different directories on my > production server. What's the best way to do this with Capistrano? > > Thanks in advance, > Kevin > > --~--~---------~--~----~------------~-------~--~----~ To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/capistrano -~----------~----~----~----~------~----~------~--~---
