-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathCapfile.recap.example
55 lines (44 loc) · 1.77 KB
/
Capfile.recap.example
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
require 'recap/recipes/rails'
require 'sushi/ssh'
require 'capistrano_colors'
require 'capistrano-unicorn'
require 'capistrano/sidekiq'
require 'capistrano/slack'
set(:sidekiq_cmd) { "#{fetch(:bundle_cmd, "bundle")} exec sidekiq -C config/sidekiq.yml" }
set(:sidekiq_pid) { File.join(deploy_to, 'tmp', 'pids', 'sidekiq.pid') }
server '8.8.8.8', :web, :app, :db, primary: true
set :domain_name, 'google.com'
set :ruby_version, '2.1.1'
set :application, 'google'
set :repository, '[email protected]:google/mail.git'
set(:user) { application }
#== Multistage
set :stages, %w(production staging)
set :default_stage, 'production'
require 'capistrano/ext/multistage'
#== Recipes
set :recipes_dir, File.expand_path('/cap-recipes', __FILE__)
load recipes_dir + '/config/recipes/base'
load recipes_dir + '/config/recipes/nginx'
load recipes_dir + '/config/recipes/postgresql'
load recipes_dir + '/config/recipes/rbenv'
load recipes_dir + '/config/recipes/unicorn'
#== Fallback vars for old recipes
set(:current_path) { deploy_to }
set(:shared_path) { deploy_to }
set(:rails_server) { 'unicorn' }
set :unicorn_user, -> { nil}
set :unicorn_pid, -> { "#{shared_path}/tmp/pids/unicorn.pid" }
set :unicorn_config, -> { "#{shared_path}/config/unicorn.rb" }
set :unicorn_log, -> { "#{shared_path}/log/unicorn.log" }
set :unicorn_workers, 1
#after 'deploy:restart', 'unicorn:reload' # app IS NOT preloaded
#after 'deploy:restart', 'unicorn:restart' # app preloaded
after 'deploy:restart', 'unicorn:duplicate' # before_fork hook implemented (zero downtime deployments)
# required
set :slack_token, '' # comes from inbound webhook integration
set :slack_room, ''
set :slack_subdomain, ''
set :slack_application, ''
set :slack_username, 'CapBot'
set :slack_emoji, ':rocket:'