summaryrefslogtreecommitdiff
path: root/config/deploy.rb
blob: d6a52e25c69d710e575034351bc9e4c7f0698446 (plain)
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
29
30
31
32
33
34
require "bundler/capistrano"

load "config/recipes/environments"
load "config/recipes/base"
load "config/recipes/nginx"
load "config/recipes/unicorn"
load "config/recipes/postgresql"
load "config/recipes/nodejs"
load "config/recipes/rbenv"
load "config/recipes/newrelic"
load "config/recipes/monit"
# general tasks
load "config/recipes/utility"

set :application, "parley"
set :user, "deployer"
set :use_sudo, false
default_run_options[:pty] = true # password prompt

set :scm, :none
set :repository, "."
set :deploy_via, :copy
set :deploy_to, "/home/#{user}/apps/#{application}"

after "deploy:update_code", "deploy:migrate"
after "deploy", "deploy:cleanup" # keep only the last 5 releases

# Instructions
##############
# cap deploy:install
# cap deploy:setup
# cap deploy:cold
# cap nginx:start # this may be necessary if it didn't start up properly before