summaryrefslogtreecommitdiff
path: root/config/deploy.rb
blob: 51d6aeed7a1e7491ed490a564d99cae667a12c89 (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
35
36
require "bundler/capistrano"
set :stages, %w(production mo)    # this needs to be set before 'capistrano/ext/multistage' is required in
set :default_stage, "production"  # this needs to be set before 'capistrano/ext/multistage' is required in
require 'capistrano/ext/multistage'

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/check"
load "config/recipes/newrelic"

set :application, "parley"
set :user, "deployer"
set :deploy_to, "/home/#{user}/apps/#{application}"
set :deploy_via, :remote_cache # keeps git repo on server cache
set :use_sudo, false

set :scm, "git"
set :branch, "master"
set :repository,  "git@github.com:madebyuppercut/parley.git"

default_run_options[:pty] = true # password prompt
ssh_options[:forward_agent] = true # no deploy key for github

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