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目录
    部分做什么
  • 文件说:

    :linked_files默认值:[]列出的文件将从 在运行期间,将应用程序的共享文件夹保存到每个发布目录中 部署。可用于永久性配置文件,如 database.yml。有关确切的目录,请参见结构

    我真的不明白那意味着什么?符号链接是什么意思

  • 关于角色的
    部分是什么意思?
    上的
    方法做什么

    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方法吗