I've been developing Rails for a while, but somehow avoiding using capistrano until now.
Trying to figure out how to get started, I've gotten confused about the best capistrano recipe for a fairly 'standard' rails 3.x with asset pipeline deploy. Perhaps because looking around on Google, one finds 'answers' from various parts of history, with different historical periods when different things were built into cap.
I've got an app I keep in git, rails 3.2, with asset pipeline, deployed to only a single host with passenger.
Thinking about it, I basically need cap to:
- deploy from git?
- make a tag in git for the deploy (and/or use a deploy branch? Whatever is most standard in cap, if there is such a thing)
- bundle install --deployment
- rake db:migrate
- rake assets:precompile
- touch tmp/restart.txt
Oh crap, one more possibly weird thing:
- think I'm going to use a system-wide rbenv install on the deploy server. Not sure what that entails.
What's the most standard, easy, simple, maintainable way to have cap do all these things? Is there anything I'm missing? If some of what I've specified is not standard, I'm happy to use the standard best practice instead (with maybe an exception or two, I really want a git tag for each deploy, even if that's not a standard best practice, although I'd think it would be, have gotten confused looking at docs how it works)
Is there an easy answer here?
EDIT: Yes, I've looked at the Cap wiki. It may be because I'm slow, but I've found answers to NONE of my questions there. There isn't even a 'getting started' document. There is no documentation of what a default out of the box cap recipe actually does. etc.
update: I wrote my own guide aftering figuring it out. https://gist.github.com/2161449