Guest User

Untitled

a guest
Jun 17th, 2018
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.44 KB | None | 0 0
  1. # encoding: utf-8
  2.  
  3. require 'fileutils'
  4. set :application, "repair-concepts"
  5. set :domain, "domain-name.de"
  6. set :repository, "Pfad zum Gitrepository"
  7. set :shared_paths, {'pfad/unterhalb-von/shared' => 'pfad/in-application',
  8. 'bundle' => 'vendor/bundle'}
  9. set :options, {:app => nil, :type => nil, :web => nil}
  10.  
  11. desc "Livesystem"
  12. task :rc_live do
  13. desc "Deploy to manager.repair-concepts.de"
  14. set :server, "servername"
  15. set :user, "deploymentuser"
  16. set :revision, "origin/stable"
  17. set :deploy_to, "pfad/zum/home-verzeichnis/des/deploymentusers"
  18. set :current_path, "#{deploy_to}/document-root"
  19. role :app, "#{user}@#{domain}", :primary => true
  20. end
  21. namespace :vlad do
  22. desc "update, bundle_install, db_migrate && cleanup"
  23. task :deploy => ['vlad:update', 'vlad:bundle_install', 'vlad:db_migrate', 'vlad:cleanup']
  24.  
  25. desc "Remote: Bundle installieren"
  26. remote_task :bundle_install, :roles => :app do
  27. run "cd #{current_release} && bundle install --deployment"
  28. end
  29.  
  30. desc "Remote-Datenbankmigration"
  31. remote_task :db_migrate, :roles => :app do
  32. run "cd #{current_release} && rake db:migrate"
  33. end
  34.  
  35. desc "Tail access-log"
  36. task :tail_access_log do
  37. system "ssh root@repair-concepts.de 'tail -n 1000 -f /pfad/zum/apache/access-log'"
  38. end
  39.  
  40. desc "Tail error-log"
  41. task :tail_error_log do
  42. system "ssh root@repair-concepts.de 'tail -n 1000 -f /pfad/zum/apache/error-log'"
  43. end
  44.  
  45. end
Add Comment
Please, Sign In to add comment