HTML and CSS Reference
In-Depth Information
The :scm variable simply tells Capistrano that Git will be used as the SCM
You can specify which branch to use by amending the :branch configuration
option . For instance, to use a branch named special, use the following setting:
set :branch, "special" # Tells capistrano which branch to use
The next variable will tell Capistrano how to deploy the application. In this
instance, rsync_with_remote_cache will be used. This will clone the Git
repository and then deploy it to the production server using rsync. This can be
handy if your server's firewall blocks incoming Git traffic.
set :deploy_via, :rsync_with_remote_cache # Tells capistrano to deploy via rsync
Rsync is an application that will compare folders and synchronize them. You can
also use rsync on remote folders on remote servers.
rsync_with_remote_cache , at the time of writing, has a bug that prevents you
from synching from folders with spaces. To get around this, you need to specify
an alternative temporary file location using the following configuration variable:
set :local_cache, '/tmp/ci/' # The directory where you want to store the rsync cache
Finally, the following Capistrano configuration options take variables from other
configuration options:
role(:web) { domain } # Your HTTP server, Apache/etc
role(:app) { domain } # This may be the same as your `Web` server
role(:db) { domain } # This is where Rails migrations will run
set :keep_releases, 5 # Tells capistrano how many releases to keep
Just to give you an overview, the complete configuration file should look
something like the following:
set :application, "continuousintegration" # The application name
require 'capistrano/ext/multistage'
require 'capistrano-offroad'
set :stages, %w(production)
set :default_stage, "production"
offroad_modules 'defaults'
set :repository, "" # The location of the
git repo, this is the read-only url
set :scm, :git # Tells capistrano to use GIT
set :branch, "master" # Tells capistrano which branch to use
set :deploy_via, :rsync_with_remote_cache # Tells capistrano to deploy via rsync
Search WWH ::

Custom Search