Sha256: 16ea1a4d9bb1c6da8e46e1445b9674c8bdfe950baa4bee4572aef7f6236d1ddb

Contents?: true

Size: 1.95 KB

Versions: 46

Compression:

Stored size: 1.95 KB

Contents

# This is a sample Capistrano config file for rubber

set :rails_env, RUBBER_ENV

on :load do
  set :application, rubber_env.app_name
  set :runner,      rubber_env.app_user
  set :deploy_to,   "/mnt/#{application}-#{RUBBER_ENV}"
  set :copy_exclude, [".git/*", ".bundle/*", "log/*"]
end

# Use a simple directory tree copy here to make demo easier.
# You probably want to use your own repository for a real app
set :scm, :none
set :repository, "."
set :deploy_via, :copy

# Easier to do system level config as root - probably should do it through
# sudo in the future.  We use ssh keys for access, so no passwd needed
set :user, 'root'
set :password, nil

# Use sudo with user rails for cap deploy:[stop|start|restart]
# This way exposed services (mongrel) aren't running as a privileged user
set :use_sudo, true

# How many old releases should be kept around when running "cleanup" task
set :keep_releases, 3

# Lets us work with staging instances without having to checkin config files
# (instance*.yml + rubber*.yml) for a deploy.  This gives us the
# convenience of not having to checkin files for staging, as well as 
# the safety of forcing it to be checked in for production.
set :push_instance_config, RUBBER_ENV != 'production'

# Allows the tasks defined to fail gracefully if there are no hosts for them.
# Comment out or use "required_task" for default cap behavior of a hard failure
rubber.allow_optional_tasks(self)
# Wrap tasks in the deploy namespace that have roles so that we can use FILTER
# with something like a deploy:cold which tries to run deploy:migrate but can't
# because we filtered out the :db role
namespace :deploy do
  rubber.allow_optional_tasks(self)
  tasks.values.each do |t|
    if t.options[:roles]
      task t.name, t.options, &t.body
    end
  end
end

# load in the deploy scripts installed by vulcanize for each rubber module
Dir["#{File.dirname(__FILE__)}/rubber/deploy-*.rb"].each do |deploy_file|
  load deploy_file
end

after "deploy", "deploy:cleanup"

Version data entries

46 entries across 23 versions & 3 rubygems

Version Path
rubber-1.13.0 lib/generators/vulcanize/templates/base/config/deploy.rb
rubber-1.13.0 generators/vulcanize/templates/base/config/deploy.rb
rubber-1.12.2 lib/generators/vulcanize/templates/base/config/deploy.rb
rubber-1.12.2 generators/vulcanize/templates/base/config/deploy.rb
rubber-1.12.1 generators/vulcanize/templates/base/config/deploy.rb
rubber-1.12.1 lib/generators/vulcanize/templates/base/config/deploy.rb
rubber-1.12.0 lib/generators/vulcanize/templates/base/config/deploy.rb
rubber-1.12.0 generators/vulcanize/templates/base/config/deploy.rb
rubber-1.11.0 lib/generators/vulcanize/templates/base/config/deploy.rb
rubber-1.11.0 generators/vulcanize/templates/base/config/deploy.rb
rubber-1.10.2 generators/vulcanize/templates/base/config/deploy.rb
rubber-1.10.2 lib/generators/vulcanize/templates/base/config/deploy.rb
rubber-1.10.1 generators/vulcanize/templates/base/config/deploy.rb
rubber-1.10.1 lib/generators/vulcanize/templates/base/config/deploy.rb
rubber-jcarnegie-0.0.1 lib/generators/vulcanize/templates/base/config/deploy.rb
rubber-jcarnegie-0.0.1 generators/vulcanize/templates/base/config/deploy.rb
rubber-1.9.1 generators/vulcanize/templates/base/config/deploy.rb
rubber-1.9.1 lib/generators/vulcanize/templates/base/config/deploy.rb
rubber-1.9.0 lib/generators/vulcanize/templates/base/config/deploy.rb
rubber-1.9.0 generators/vulcanize/templates/base/config/deploy.rb