On Feb 11, 6:49 am, Chris Berkhout <[email protected]> wrote: > On Fri, Feb 11, 2011 at 11:35 AM, Ben Hoskings <[email protected]> wrote: > > One reason some prefer to have versioned directories + a symlink is to store > > deploy history and enable easy rollbacks. > > I use a deploy branch that I merge into using --no-ff (i.e. don't fast > > forward, always create a merge commit) before each deploy. This provides the > > same history, and has the advantage that since it's git commit history, it's > > immutable—there's no question about what was deployed when, and the history > > is backed up everywhere. > > Rolling back just means resetting to a previous merge commit on that branch. > > Right, the history is always there, but you're not concerned about a > git merge/reset not being as instant as a symlink change?
I use the git approach on all of my apps (well except the few on Heroku at least) and it's not a problem. The existing codebase is live until tmp/restart.txt is touched, and unless it is a particularly massive diff it's really quick. Sure, probably an order of magnitude slower but we are talking about 1-3secs vs <1sec. I get the benefits of being able to quickly switch between *any* tagged release, plus the knowledge that if I rollback then all the correct migrations are rolled back automatically too regardless of where I've jumped to in my commit history. For me that is enough of a win, and I've never experienced a case where the difference in rollback speeds between symlinks and git had any net impact. Deployments are much, much quicker. Not having to clean up old releases, remember releases by timestamp, and less disk usage are wins too but none of which would be enough to sway me either direction. Here's how I do it: http://rubypond.com/blog/github-style-capistrano-deployment https://github.com/rubypond/git-based-deploy Glenn -- You received this message because you are subscribed to the Google Groups "Ruby or Rails Oceania" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rails-oceania?hl=en.
