-
Notifications
You must be signed in to change notification settings - Fork 25
/
deploy.rb
44 lines (33 loc) · 1.19 KB
/
deploy.rb
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
# config valid only for current version of Capistrano
lock '3.7.1'
set :application, 'citadel'
# git settings
set :repo_url, 'git@github.com:ozfortress/citadel.git'
set :branch, :master
# Default deploy_to directory is /var/www/my_app_name
set :deploy_to, '/opt/citadel'
set :rails_env, 'production'
# Default value for :format is :pretty
# set :format, :pretty
# Default value for :log_level is :debug
# set :log_level, :debug
# Make sure password prompts show locally
set :pty, true
# Files and folders to keep between deployments
set :linked_files, fetch(:linked_files, []).push('config/database.yml', 'config/secrets.yml')
set :linked_dirs, fetch(:linked_dirs, []).push('log', 'tmp', 'key', 'certificates',
'challenge', 'vendor/bundle', 'public/uploads')
# Default value for default_env is {}
# set :default_env, { path: "/opt/ruby/bin:$PATH" }
# Default value for keep_releases is 5
set :keep_releases, 5
namespace :deploy do
after :restart, :clear_cache do
on roles(:web), in: :groups, limit: 3, wait: 10 do
# Here we can do anything such as:
# within release_path do
# execute :rake, 'cache:clear'
# end
end
end
end