master
 1# config valid only for current version of Capistrano
 2lock "3.7.2"
 3
 4set :application, "stronglifters"
 5set :repo_url, "git@gitlab.com:stronglifters/surface.git"
 6
 7# Default branch is :master
 8# ask :branch, `git revparse abbrevref HEAD`.chomp
 9
10# Default deploy_to directory is /var/www/my_app_name
11# set :deploy_to, "/var/www/my_app_name"
12
13# Default value for :format is :airbrussh.
14# set :format, :airbrussh
15
16# You can configure the Airbrussh format using :format_options.
17# These are the defaults.
18# set :format_options, command_output: true, log_file: "log/capistrano.log", color: :auto, truncate: :auto
19
20# Default value for :pty is false
21# set :pty, true
22
23# Default value for :linked_files is []
24append :linked_files, "config/database.yml"
25
26# Default value for linked_dirs is []
27append :linked_dirs, "log", "tmp/pids", "tmp/cache", "tmp/sockets", "public/system"
28
29# Default value for default_env is {}
30# set :default_env, { path: "/opt/ruby/bin:$PATH" }
31
32# Default value for keep_releases is 5
33# set :keep_releases, 5
34set :ssh_options, forward_agent: true
35set :rbenv_type, :system
36set :rbenv_ruby, `cat .ruby-version`.strip
37
38namespace :deploy do
39  task :restart do
40    on roles(:web) do
41      sudo :sv, "restart puma"
42    end
43    on roles(:app) do
44      sudo :sv, "restart sidekiq"
45    end
46  end
47
48  after :publishing, :restart
49end