Ruby on rails 了解此capistrano部署文件
我有一个Ruby on rails 了解此capistrano部署文件,ruby-on-rails,capistrano,Ruby On Rails,Capistrano,我有一个config/deploy.rb文件,如下所示: # require './config/boot' # config valid only for Capistrano 3.2 lock '3.9.0' set :application, 'arthousecoop' set :repo_url, 'git@github.com:arthousecoop/arthousecoop.git' set :ssh_options, {forward_agent: true} set :d
config/deploy.rb
文件,如下所示:
# require './config/boot'
# config valid only for Capistrano 3.2
lock '3.9.0'
set :application, 'arthousecoop'
set :repo_url, 'git@github.com:arthousecoop/arthousecoop.git'
set :ssh_options, {forward_agent: true}
set :deploy_to, '/home/sbp/rails'
set :linked_files, %w{config/database.yml}
set :linked_dirs, %w{bin log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system}
# Default value for default_env is {}
# set :default_env, { path: "/opt/ruby/bin:$PATH" }
namespace :deploy do
# before :deploy, 'rvm1:install:gems'
# before :deploy, 'deploy:check_revision'
# after :finishing, 'deploy:cleanup'
desc 'Restart application'
task :restart do
on roles(:app), in: :sequence, wait: 5 do
within release_path do
execute :bundle, 'exec thin restart -C /etc/thin/sbp.yml'
end
end
end
after :publishing, :restart
before :restart, 'rvm:hook'
after :finished, 'airbrake:deploy'
# 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
链接的\u文件
和链接的\u目录
部分做什么部分是什么意思?
上的方法做什么
task :restart do
on roles(:app), in: :sequence, wait: 5 do
within release_path do
execute :bundle, 'exec thin restart -C /etc/thin/sbp.yml'
end
release\u path
是Capistrano方法吗