While reading through Capistrano’s code I’ve come across many the variables used to configure
deploy.rb. So I don’t forget them when I need them, I’ll document them here:
- application – required
- repository – required
scm – defaults to
deploy_via – defaults to
- revision – defaults to the latest head version
- rails_env – defaults to ‘production’
- rake – defaults to ‘rake’
Capistrano::Deploy::Strategyobject defined by
- release_name – timestamp in the form of “%Y%m%d%H%M%S”
- version_dir – defaults to ‘releases’
- shared_dir – defaults to ‘shared’
shared_children – defaults to
['public/system', 'log', 'tmp/pids']
- current_dir – defaults to ‘current’
- releases_path – path of deploy_to + version_dir (e.g. /u/apps/example/releases )
- shared_path – path of deploy_to + shared_dir (e.g. /u/apps/example/shared )
- current_path – path of deploy_to + current_dir (e.g. /u/apps/example/current )
- release_path – path of releases_path + release_name (e.g. /u/apps/example/releases/20100624000000 )
releases – list of releases, found by running
- current_release – path of releases_path + last release (e.g. /u/apps/example/releases/20100624000000 )
- previous_release – path of releases_path + previous release (e.g. /u/apps/example/releases/20100623000000 )
- current_revision – revision id of the current release, found in the REVISION file
- latest_revision – revision id of the latest release
- previous_revision – revision id of the previous release
run_method – either
:sudodepending on if
- latest_release – release path or the current release depending on if the current symlink is valid
maintenence_basename – defaults to “maintenance”. This and
maintenence_tempate_pathare used to customize the page shown when the application is disabled (e.g.
- maintenence_template_path – defaults to the ‘templates/maintenance.rhtml’ path
migrate_target – the version to migrate to. Defaults to
All of these variables come from lib/capistrano/recipes/deploy.rb.
Updated for Capistrano 2.15.4 on 2013-09-19.
Don’t forget: port
Any chance these have drifted out-of-date? The post is three years old now…
They might have. Some of the more important ones like repository, deploy_via, and scm are still used since those are what you use to configure capistrano. I’ll do a refresh of the variables based on the latest version.
Comments are closed.