Skip to content

Instantly share code, notes, and snippets.

@kaspergrubbe
Created February 26, 2013 17:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kaspergrubbe/5040187 to your computer and use it in GitHub Desktop.
Save kaspergrubbe/5040187 to your computer and use it in GitHub Desktop.
Deploy script
set :application, "self"
set :repository, "git@github.com:kaspergrubbe/self.git"
set :branch, "master"
set :deploy_via, :copy
set :migrate_target, :current
set :rails_env, "production"
set :deploy_to, "/home/deployer/apps/#{application}"
# set :scm, :git # You can set :scm explicitly or Capistrano will make an intelligent guess based on known version control directory names
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none`
role :web, "176.58.122.173" # Your HTTP server, Apache/etc
role :app, "176.58.122.173" # This may be the same as your `Web` server
role :db, "176.58.122.173", :primary => true # This is where Rails migrations will run
# if you want to clean up old releases on each deploy uncomment this:
after "deploy:restart", "deploy:cleanup"
set :user, "deployer"
set :use_sudo, false
# Set up environment for RBenv
set :default_environment, {
'PATH' => "/home/#{user}/.rbenv/shims:/home/#{user}/.rbenv/bin:$PATH"
}
require 'bundler/capistrano'
require 'simple-capistrano-unicorn'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment