2015-08-10 21:50:52 +03:00
|
|
|
# config valid only for current version of Capistrano
|
2019-10-04 14:39:35 +03:00
|
|
|
lock "3.11.2"
|
2014-08-31 17:18:10 +03:00
|
|
|
|
2019-04-28 21:10:54 +03:00
|
|
|
set :application, "clarion"
|
|
|
|
set :repo_url, "https://github.com/ignisf/clarion.git"
|
2014-08-31 17:18:10 +03:00
|
|
|
|
|
|
|
# Default branch is :master
|
2015-08-10 21:50:52 +03:00
|
|
|
ask :branch, `git rev-parse --abbrev-ref HEAD`.chomp
|
2014-08-31 17:18:10 +03:00
|
|
|
|
|
|
|
# Default deploy_to directory is /var/www/my_app
|
2019-04-28 21:10:54 +03:00
|
|
|
set :deploy_to, "/home/barf/clarion"
|
2014-08-31 17:18:10 +03:00
|
|
|
|
|
|
|
# Default value for :scm is :git
|
|
|
|
# set :scm, :git
|
|
|
|
|
|
|
|
# Default value for :format is :pretty
|
|
|
|
# set :format, :pretty
|
|
|
|
|
|
|
|
# Default value for :log_level is :debug
|
|
|
|
# set :log_level, :debug
|
|
|
|
|
|
|
|
# Default value for :pty is false
|
|
|
|
# set :pty, true
|
|
|
|
|
|
|
|
# Default value for :linked_files is []
|
2019-04-28 21:10:54 +03:00
|
|
|
set :linked_files, fetch(:linked_files, []).push("config/database.yml", "config/secrets.yml")
|
2014-08-31 17:18:10 +03:00
|
|
|
|
|
|
|
# Default value for linked_dirs is []
|
2019-05-05 14:47:53 +03:00
|
|
|
|
|
|
|
set :linked_dirs, fetch(:linked_dirs, []).push("log", "tmp/uploads", "tmp/pids",
|
|
|
|
"tmp/cache", "tmp/sockets",
|
|
|
|
"vendor/bundle", "public/system",
|
|
|
|
"public/uploads",
|
|
|
|
"public/.well_known")
|
2014-08-31 17:18:10 +03:00
|
|
|
|
|
|
|
# Default value for default_env is {}
|
|
|
|
# set :default_env, { path: "/opt/ruby/bin:$PATH" }
|
|
|
|
|
|
|
|
# Default value for keep_releases is 5
|
2021-07-27 19:14:38 +03:00
|
|
|
set :keep_releases, 550
|
2014-08-31 17:18:10 +03:00
|
|
|
|
2024-09-22 22:44:30 +03:00
|
|
|
set :rvm_ruby_version, "3.3.5"
|
2015-08-10 21:50:52 +03:00
|
|
|
|
|
|
|
set :puma_bind, ["tcp://127.0.0.1:9087"]
|
|
|
|
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
|
|
|
|
|
2019-04-28 21:10:54 +03:00
|
|
|
set :nginx_sites_available_path, shared_path.to_s
|
2015-08-10 21:50:52 +03:00
|
|
|
set :nginx_sites_enabled_path, "/tmp"
|
2019-04-28 21:10:54 +03:00
|
|
|
set :nginx_server_name, "cfp.openfest.org"
|
2014-09-30 13:39:05 +03:00
|
|
|
|
2014-08-31 17:18:10 +03:00
|
|
|
namespace :deploy do
|
2016-07-05 17:05:02 +03:00
|
|
|
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
|
2014-08-31 17:18:10 +03:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|