Skip to content

Instantly share code, notes, and snippets.

@esmarkowski
Created November 11, 2011 03:02
Show Gist options
  • Save esmarkowski/1357070 to your computer and use it in GitHub Desktop.
Save esmarkowski/1357070 to your computer and use it in GitHub Desktop.
Multi-Stage Capistrano Config with Gitflow and Tampon
set :keep_releases, 3
set :stages, %w(production staging)
require 'rainbow'
require 'capistrano/ext/multistage'
require 'capistrano/tampon'
require 'bundler/capistrano'
require 'thinking_sphinx/deploy/capistrano'
set :user, 'deploy'
set :scm, :git
set :scm_verbose, false
set :repository, 'git@your/repo.git'
set :deploy_via, :remote_cache
set :use_sudo, false
# If you're using sync.rb https://gist.github.com/339471
#set :sync_directories, ["public/system"]
#set :sync_backups, 3
set :rails_env, "production"
set :keep_releases, 3
set :application, "PRODUCTION.COM"
set :deploy_to, "/home/deploy/PRODUCTION.COM/"
role :app, 'PRODUCTION.COM'
role :web, 'PRODUCTION.COM'
role :db, 'PRODUCTION.COM', :primary => true
set :rails_env, "staging"
set :keep_releases, 2
set :application, "staging.wherever.com"
set :deploy_to, "/home/deploy/staging.wherever.com/"
role :app, 'staging.wherever.com'
role :web, 'staging.wherever.com'
role :db, 'staging.wherever.com', :primary => true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment