clarion/config/deploy.rb

60 lines
1.6 KiB
Ruby
Raw Normal View History

2015-08-10 21:50:52 +03:00
# config valid only for current version of Capistrano
2016-07-05 16:54:37 +03:00
lock '3.5.0'
2014-08-31 17:18:10 +03:00
set :application, 'clarion'
set :repo_url, 'https://github.com/ignisf/clarion.git'
# 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
set :deploy_to, '/home/barf/clarion'
# 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 []
2015-08-10 21:50:52 +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 []
2015-11-05 13:17:59 +02:00
set :linked_dirs, fetch(:linked_dirs, []).push('log', 'tmp/uploads', 'tmp/pids', 'tmp/cache', 'tmp/sockets', 'vendor/bundle', 'public/system', 'public/uploads')
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
# set :keep_releases, 5
2015-08-10 21:50:52 +03:00
set :rvm_ruby_version, '2.2.2'
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
set :nginx_sites_available_path, "#{shared_path}"
set :nginx_sites_enabled_path, "/tmp"
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