How does Capistrano work by default?
Ok, before you downvote, hear me out… There are lots of walkthroughs online for deploying cakePHP/Wordpress/Drupal/Symfony via Capistrano and the projects own document is pretty good, but there’s not a lot of coverage over what Capistrano actually does by default. Specifically, do a git checkout to folder
/current, webroot having previously been symlinked to
I ask this question because we have a non-standard, hacked capistrano deploy process for a few legacy reasons and I’d like to bring us into alignment with the default behavior. In order to do so, I’d like background in what, exactly capistrano’s default behavior actually is.
cp -Ra /home/username/deploy/shared/./ /home/username/deploy/releases/20121026170156/: this command takes forever to complete and I don’t see anydocumentation of
/shared being used this way: what is the typical role played by
One Solution collect form web for “How does Capistrano work by default?”
While probably only the start to the answer, one of the best ways to understand any FOSS project is via the source.
Coming from the PHP world, you may be unfamiliar about how a Ruby Gem is composed. Gems are made available to the system path [as an executable] by the presence of file in the
/bin dir of the gem. Capistrano’s is here – and from this you can see where begins the process of calling
cap production deploy.
require 'capistrano/cli' Capistrano::CLI.execute
In this case it loads the CLI library, and then calls a command therein. Start there to trace what you need.