2015-10-06 15:46:55 +03:00
|
|
|
# config valid only for current version of Capistrano
|
2023-09-18 20:03:12 +03:00
|
|
|
lock '3.17.1'
|
2015-10-06 15:46:55 +03:00
|
|
|
|
|
|
|
set :application, 'gauge'
|
|
|
|
set :repo_url, 'https://github.com/OpenFest/gauge.git'
|
|
|
|
|
|
|
|
# Default branch is :master
|
|
|
|
# ask :branch, `git rev-parse --abbrev-ref HEAD`.chomp
|
|
|
|
|
|
|
|
# Default deploy_to directory is /var/www/my_app_name
|
|
|
|
set :deploy_to, '/home/barf/gauge'
|
|
|
|
|
|
|
|
# Default value for :scm is :git
|
|
|
|
# set :scm, :git
|
|
|
|
|
2016-10-01 02:09:59 +03:00
|
|
|
# Default value for :format is :airbrussh.
|
|
|
|
# set :format, :airbrussh
|
2015-10-06 15:46:55 +03:00
|
|
|
|
2016-10-01 02:09:59 +03:00
|
|
|
# You can configure the Airbrussh format using :format_options.
|
|
|
|
# These are the defaults.
|
|
|
|
# set :format_options, command_output: true, log_file: 'log/capistrano.log', color: :auto, truncate: :auto
|
2015-10-06 15:46:55 +03:00
|
|
|
|
|
|
|
# Default value for :pty is false
|
|
|
|
# set :pty, true
|
|
|
|
|
|
|
|
# Default value for :linked_files is []
|
2016-10-01 03:48:23 +03:00
|
|
|
append :linked_files, 'config/database.yml', 'config/secrets.yml'
|
2015-10-06 15:46:55 +03:00
|
|
|
|
|
|
|
# Default value for linked_dirs is []
|
2016-10-06 23:02:39 +03:00
|
|
|
append :linked_dirs, 'log', 'tmp/pids', 'tmp/cache', 'tmp/sockets', 'vendor/bundle', 'public/system'
|
2015-10-06 15:46:55 +03:00
|
|
|
|
|
|
|
# Default value for default_env is {}
|
|
|
|
# set :default_env, { path: "/opt/ruby/bin:$PATH" }
|
|
|
|
|
|
|
|
# Default value for keep_releases is 5
|
2019-10-07 14:59:44 +03:00
|
|
|
set :keep_releases, 50
|
2015-10-06 15:46:55 +03:00
|
|
|
|
2019-10-04 12:10:27 +03:00
|
|
|
set :rvm_ruby_version, '2.6.5'
|
2015-10-06 15:46:55 +03:00
|
|
|
|
2015-10-06 16:59:45 +03:00
|
|
|
set :puma_bind, ["tcp://127.0.0.1:9088"]
|
2015-10-06 15:46:55 +03:00
|
|
|
set :puma_init_active_record, true
|
|
|
|
set :puma_access_log, "#{shared_path}/log/puma_access.log"
|
|
|
|
set :puma_error_log, "#{shared_path}/log/puma_error.log"
|
|
|
|
set :puma_preload_app, true
|
2017-10-05 07:37:38 +03:00
|
|
|
set :puma_threads, [0, 16]
|
|
|
|
set :puma_workers, 0
|
2015-10-06 15:46:55 +03:00
|
|
|
|
|
|
|
set :nginx_sites_available_path, "#{shared_path}"
|
|
|
|
set :nginx_sites_enabled_path, "/tmp"
|
|
|
|
set :nginx_server_name, 'vote.openfest.org'
|
|
|
|
|
|
|
|
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
|