PageRenderTime 23ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 0ms

/config/deploy.rb

https://bitbucket.org/yuya373/mlb
Ruby | 54 lines | 14 code | 14 blank | 26 comment | 0 complexity | d864abab819dda469542ebd4b5f93f50 MD5 | raw file
  1. # config valid only for Capistrano 3.1
  2. lock '3.1.0'
  3. set :application, 'mlb'
  4. set :repo_url, 'git@bitbucket.org:yuya373/mlb.git'
  5. # Default branch is :master
  6. # ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp }
  7. # Default deploy_to directory is /var/www/my_app
  8. # set :deploy_to, '/var/www/my_app'
  9. set :deploy_to, '/home/vagrant/mlb'
  10. # Default value for :scm is :git
  11. # set :scm, :git
  12. # Default value for :format is :pretty
  13. # set :format, :pretty
  14. # Default value for :log_level is :debug
  15. # set :log_level, :debug
  16. # Default value for :pty is false
  17. # set :pty, true
  18. # Default value for :linked_files is []
  19. set :linked_files, %w{config/database.yml config/secrets.yml}
  20. # Default value for linked_dirs is []
  21. set :linked_dirs, %w{bin log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system}
  22. # Default value for default_env is {}
  23. # set :default_env, { path: "/opt/ruby/bin:$PATH" }
  24. # Default value for keep_releases is 5
  25. set :keep_releases, 5
  26. namespace :deploy do
  27. desc 'Restart application'
  28. task :restart do
  29. invoke 'unicorn:restart'
  30. end
  31. after :publishing, :restart
  32. # after :restart, :clear_cache do
  33. # on roles(:web), in: :groups, limit: 3, wait: 10 do
  34. # Here we can do anything such as:
  35. # within release_path do
  36. # execute :rake, 'cache:clear'
  37. # end
  38. # end
  39. # end
  40. end