Skip to content

darcy/recipes

Repository files navigation

Description

Small collection of cap recipes.

Usage

1. Capify

capify .

2a. Checkout out this to lib

git checkout git://github.com:darcy/recipes.git lib/recipes
rm -rf lib/recipes/.git

2b. Add this repo as a submodule

git submodule add git@github.com:darcy/recipes.git lib/recipes
git submodule init
git submodule update

3a. Add selected scripts as needed to deploy.rb

load('lib/recipes/backup.rb')
load('lib/recipes/certify.rb')

3b. Add all the scripts

Dir['lib/recipes/*.rb'].each { |plugin| load(plugin) }

4. Optionally, config the deploy script with environments

# Deploy:
# => cap staging certify deploy
# => cap production certify:force deploy

set :application, "app"
set :repository,  "git@github.com:repo/app.git"

#############################################################
# Servers
#############################################################

task :production do
  set :rails_env, "production"
  set :branch, "production"
  set :certify_branch, "staging"
  set :domain, "127.0.0.1"
  server domain, :app, :web
  role :db, domain, :primary => true
  set :web_domain, "www.example.com"
end

task :staging do
  set :rails_env, "production" #set to staging if you have that setup
  set :branch, "staging"
  set :certify_branch, "origin/master"
  set :domain, "127.0.0.1"
  server domain, :app, :web
  role :db, domain, :primary => true
  set :web_domain, "staging.example.com"
end

About

Collection of capistrano recipes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages