PageRenderTime 49ms CodeModel.GetById 28ms RepoModel.GetById 0ms app.codeStats 0ms

/config/deploy.rb

https://bitbucket.org/qoden-vtikhomirov/my-site
Ruby | 34 lines | 19 code | 10 blank | 5 comment | 0 complexity | 126ff8ca21ad6541ebd4fb670759a1b5 MD5 | raw file
  1. # config valid only for current version of Capistrano
  2. lock '3.6.1'
  3. set :user, 'deployer'
  4. server 'studiomobile-server', user:fetch(:user), roles:%w{app web db}
  5. set :application, 'studiomobile.ru'
  6. set :repo_url, 'git@bitbucket.org:efpies/studiomobile-site.git'
  7. set :deploy_to, -> { "/home/#{fetch :user}/#{fetch :application}/#{fetch :rails_env}" }
  8. set :linked_files, fetch(:linked_files,[]).push('config/secrets.yml')
  9. set :linked_dirs, fetch(:linked_dirs,[]).push('log', 'tmp/cache', 'public/images/uploads')
  10. set :ssh_options, keepalive: true
  11. set :use_sudo, false
  12. set :rvm_ruby_version, '2.3.1' # Also defined in Gemfile
  13. set :rvm_roles, [:app, :web]
  14. set :keep_releases, 2
  15. namespace :deploy do
  16. after :restart, :clear_cache do
  17. on roles(:web), in: :groups, limit: 3, wait: 10 do
  18. # Here we can do anything such as:
  19. # within release_path do
  20. # execute :rake, 'cache:clear'
  21. # end
  22. end
  23. end
  24. end