public
Created

Deploy script

  • Download Gist
Deploy.rb
Ruby
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
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'

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.