-
Notifications
You must be signed in to change notification settings - Fork 26
/
Capfile.template
68 lines (56 loc) · 2.17 KB
/
Capfile.template
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# ---- Load the default capistrano deploy recipe ----
load 'deploy'
# ---- Set where the environment specific configuration are ----
set :config_root, '<config root>'
# ---- Load the recipes from the multiconfig gem ----
require 'capistrano/multiconfig'
# ---- load tasks from ./config dir ----
Dir['<base path>/deploynaut/ruby/*.rb'].each { |task| load(task) }
# ---- What directories are shared between releases ----
set :shared_children, %w(assets)
# ---- change the effective symlink to www ----
set :current_dir, 'www'
# ---- Keep at the most five releases ----
set :keep_releases, 5
# ---- Prevent asking for passwords ----
set :password, false
set :use_sudo, false
# ---- Prevent transfer of VCS files ----
set :copy_exclude, ["**/.git", "**/.svn", "**/.DS_Store"]
# ---- rsync/ssh options for asset transfers ----
#
# rsync options explained:
# -l: Copy symlinks as symlinks
# -t: Preserve times
# -r: Recurse into directories
# -p: Preserve permissions
# -o: Preserve owner
# -g: Preserve group
# --stats: Show some transfer stats after transfer finished (speeds, number of files etc)
#
# Note the -z has deliberately been left out, as it's only useful
# when network speeds are slow and files are more compressable.
# In the case of most assets they are not very compressable; think
# JPG, PNG, videos etc which are already highly compressed, and
# network speed between deploynaut and the target instance fast (usually).
# Turning this on would only increase the CPU usage for no benefit.
#
# ssh options explained:
# -q: Quiet (specifically to not show SSH welcome text)
# -T: Disable TTY since there is no interactivity required
# -c: Use a different cipher to improve performance
# -o: Disable compression (see -z reason above)
#
# NOTE: If you change these options, please update the notes above
#
set :rsync_options, %w[-ltrpog --stats]
set :rsync_ssh_options, %w[-q -T -c arcfour -o Compression=no]
# ---- SSH options ----
ssh_options[:forward_agent] = true
ssh_options[:keys] = '<ssh key>'
default_run_options[:pty] = true
default_run_options[:shell] = '/bin/bash'
# ---- What SCM are we using ----
set :scm, "git"
# --- RoR behaviour override ---
set :normalize_asset_timestamps, false