Created
November 1, 2010 18:29
-
-
Save jh3/658648 to your computer and use it in GitHub Desktop.
An example Capfile for drupal-deploy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'drupal-deploy' | |
load File.join(File.dirname(__FILE__), 'config', 'lib', 'deploy') | |
# The name of your Drupal site | |
set :application, "sandbox" | |
# The user that will own the files directory | |
set :web_user, "apache" | |
# The working directory of your drupal site on your development machine | |
set :application_wd, "/var/www/webapps/#{application}/drupal" | |
# Server information | |
set :development_server, "dev.domain.com" | |
set :staging_server, "stage.domain.com" | |
set :production_server, "prod.domain.com" | |
# SCM settings | |
# ============ | |
# It is assumed that your repository is on your development server | |
# Be sure to change anything here to suit your needs | |
default_run_options[:pty] = true | |
set :ssh_options, { :forward_agent => true } | |
set :repository, "git@#{development_server}:#{application}.git" | |
set :scm, :git | |
set :branch, "master" | |
set :repository_cache, "git_master" | |
set :copy_exclude, [ ".git*" ] | |
set :scm_verbose, true | |
set :keep_releases, 5 | |
# Multistage settings | |
# =================== | |
# Search your config/deploy directory for separate stage files and | |
# add them to your list of stages. By default, you must specify a stage | |
# when executing commands. For example, 'cap staging deploy'. | |
#set :default_stage, "staging" | |
if File.exist?('config/deploy') | |
set(:stages) do | |
Dir[File.join('config', 'deploy') + '/*.rb'].map do |f| | |
f.match(/[^\/]+?(?=\.[^\/]+$)/)[0] | |
end | |
end | |
require 'capistrano/ext/multistage' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment