Advertisement
Guest User

Untitled

a guest
May 3rd, 2015
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. set :application, 'APPNAME'
  2. set :repo_url, 'git@github.com:YOU/APPNAME.git'
  3.  
  4. # Default branch is :master
  5. # ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp }
  6.  
  7. # Default deploy_to directory is /var/www/my_app
  8. set :deploy_to, '/u/apps/APPNAME'
  9.  
  10. # Use agent forwarding for SSH so you can deploy with the SSH key on your workstation.
  11. set :ssh_options, {
  12. forward_agent: true
  13. }
  14.  
  15. # Default value for :pty is false
  16. set :pty, true
  17.  
  18. # Default value for :linked_files is []
  19. set :linked_files, %w{config/database.yml}
  20.  
  21. # Default value for linked_dirs is []
  22. set :linked_dirs, %w{.rbenv-vars bin log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system}
  23.  
  24. # Default value for default_env is {}
  25. set :default_env, { path: "/opt/rbenv/shims:$PATH" }
  26.  
  27. set :bundle_bins, fetch(:bundle_bins, []).push("unicorn")
  28.  
  29. # Default value for keep_releases is 5
  30. # set :keep_releases, 5
  31.  
  32. namespace :deploy do
  33.  
  34. desc 'Restart application'
  35. task :restart do
  36. on roles(:app), in: :sequence, wait: 5 do
  37. execute :touch, release_path.join('tmp/restart.txt')
  38. end
  39. end
  40.  
  41. after :publishing, :restart
  42.  
  43. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement