Skip to content

Instantly share code, notes, and snippets.

@ed-lea
Created September 5, 2012 14:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ed-lea/3637903 to your computer and use it in GitHub Desktop.
Save ed-lea/3637903 to your computer and use it in GitHub Desktop.
# deploy.rb
#
# Multistage Deployment
#
set :stages, %w(production staging)
set :default_stage, "staging"
set :stage_dir, "app/config"
require 'capistrano/ext/multistage'
#
# SCM
#
set :user, "my-deploy-user"
set :repository, "git@github.com:ed-lea/site.me.git"
set :scm, :git
set :branch, "master"
set :deploy_via, :copy
#
# Application
#
set :model_manager, "doctrine"
set :app_path, "app"
set :shared_files, [ "app/config/parameters.ini" ]
set :shared_children, [ app_path + "/logs", web_path + "/uploads", "vendor" ]
#
# Deployment
#
set :keep_releases, 3
set :use_sudo, false
set :update_vendors, true
set :vendors_mode, "install"
set :dump_assetic_assets, true
set :cache_warmup, false
# -------
# staging.rb
server 'site.me', :app, :web, :primary => true
#
# Project
#
set :application, "app-name"
set :domain, "site.me"
set :deploy_to, "/var/www/site"
#
# Deployment
#
role :web, domain # Your HTTP server, Apache/etc
role :app, domain # This may be the same as your `Web` server
role :db, domain, :primary => true # This is where Rails migrations will run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment