Advertisement
Guest User

deploy.rb

a guest
Jun 20th, 2014
305
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # config valid only for Capistrano 3.1
  2. lock '3.1.0'
  3.  
  4. # rbenv
  5. set :rbenv_type, :user
  6. set :rbenv_ruby, '2.1.2'
  7.  
  8. # bundler
  9. set :bundle_gemfile, -> { release_path.join('Gemfile') }
  10. set :bundle_dir, -> { shared_path.join('bundle') }
  11. #set :bundle_dir, -> { path: "/usr/bin/bundle" }
  12. set :bundle_flags, '--deployment --quiet'
  13. set :bundle_without, %w{development test}.join(' ')
  14. set :bundle_binstubs, -> { shared_path.join('bin') }
  15. set :bundle_roles, :all
  16.  
  17.  
  18.  
  19. set :application, APP-NAME
  20. set :repo_url, GITHUB-URL
  21.  
  22. # Default branch is :master
  23. # ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp }
  24.  
  25. # Default deploy_to directory is /var/www/my_app
  26. set :deploy_to, '/var/www/APP-NAME'
  27.  
  28. # Default value for :linked_files is []
  29. set :linked_files, %w{config/database.yml}
  30.  
  31. # Default value for linked_dirs is []
  32. set :linked_dirs, %w{bin log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system}
  33.  
  34. # Default value for default_env is {}
  35. set :default_env, { path: "~/.rbenv/shims:~/.rbenv/bin:$PATH" }
  36.  
  37. namespace :deploy do
  38.  
  39. desc 'Restart application'
  40. task :restart do
  41. on roles(:app), in: :sequence, wait: 5 do
  42. # Your restart mechanism here, for example:
  43. execute :touch, release_path.join('tmp/restart.txt')
  44. end
  45. end
  46. after :publishing, :restart
  47. after :finishing, 'deploy:cleanup'
  48.  
  49. end
  50. ~
  51.  
  52. This ad is supporting your extension ruul (screen ruler): More info | Privacy Policy | Hide on this page
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement