PageRenderTime 43ms CodeModel.GetById 11ms RepoModel.GetById 0ms app.codeStats 0ms

/config/deploy.rb

https://bitbucket.org/umeyuki/orenovideo
Ruby | 65 lines | 21 code | 19 blank | 25 comment | 0 complexity | 99f7d886625f7491450e02964dba8868 MD5 | raw file
  1. # config valid only for Capistrano 3.1
  2. lock '3.2.1'
  3. set :application, 'orenovideo'
  4. set :repo_url, 'git@bitbucket.org:umeyuki/pochit.git'
  5. set :branch, 'master'
  6. # Default branch is :master
  7. # ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp }.call
  8. # Default deploy_to directory is /var/www/my_app
  9. set :deploy_to, "/export/#{fetch(:application)}"
  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}
  20. # Default value for linked_dirs is []
  21. set :linked_dirs, %w{bin log tmp/pids tmp/cache tmp/sockets bundle public/system public/assets}
  22. # Default value for default_env is {}
  23. set :default_env, { path: "/home/umeyuki/local/ruby-2.1.1/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. on roles(:app), in: :sequence, wait: 5 do
  30. info capture "printenv PATH"
  31. execute "sudo /etc/init.d/orenovideo restart"
  32. # Your restart mechanism here, for example:
  33. # execute :touch, release_path.join('tmp/restart.txt')
  34. end
  35. end
  36. after :publishing, :restart
  37. # after :publishing, :restart
  38. # after :restart, :clear_cache do
  39. # on roles(:web), in: :groups, limit: 3, wait: 10 do
  40. # # Here we can do anything such as:
  41. # # within release_path do
  42. # # execute :rake, 'cache:clear'
  43. # # end
  44. # end
  45. # end
  46. end