Created
September 5, 2012 14:59
-
-
Save ed-lea/3637903 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# 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, "[email protected]: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