Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2014
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. #config valid only for Capistrano 3.1
  2. lock '3.1.0'
  3.  
  4. set :application, 'testapp'
  5. set :scm, :git
  6. set :repo_url, 'git@bitbucket.org:sergiotapia/testapp.git'
  7.  
  8. set :user, "deploy" # The user on the VPS server.
  9. set :password, "hunter2$$"
  10. set :use_sudo, false
  11. set :deploy_to, "/home/deploy/www/testapp"
  12. set :deploy_via, :remote_cache
  13. set :pty, true
  14. set :format, :pretty
  15. set :keep_releases, 1
  16. set :rails_env, "production"
  17. set :migrate_target, :latest
  18.  
  19. namespace :deploy do
  20.  
  21. desc 'Restart application'
  22. task :restart do
  23. on roles(:app), in: :sequence, wait: 5 do
  24. # Your restart mechanism here, for example:
  25. # execute :touch, release_path.join('tmp/restart.txt')
  26. execute :touch, release_path.join('tmp/restart.txt')
  27. system "curl --silent #{fetch(:ping_url)}"
  28. end
  29. end
  30.  
  31. after :publishing, :restart
  32.  
  33. after :restart, :clear_cache do
  34. on roles(:web), in: :groups, limit: 3, wait: 10 do
  35. # Here we can do anything such as:
  36. # within release_path do
  37. # execute :rake, 'cache:clear'
  38. # end
  39. end
  40. end
  41.  
  42. end
  43.  
  44. DEBUG [322bb1fd] Enter passphrase for key '/home/deploy/.ssh/id_rsa':
  45.  
  46. DEBUG [484154d4] Enter passphrase for key '/home/deploy/.ssh/id_rsa':
  47. qwef
  48.  
  49. ewf
  50. qw
  51. ef
  52. qwef
  53. wqe
  54. f
  55. qwef
  56. wqe
  57. f
  58. ^Ccap aborted!
  59. Interrupt:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement