Guest User

Untitled

a guest
Jun 24th, 2018
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. # Application name, used in deploy/#{stage}.rb
  2. set :application, "mystock"
  3.  
  4. # Multistage settings
  5. # :deploy_to is set in deploy/#{stage}.rb
  6. set :default_stage, "staging"
  7. set(:stage_path) { "#{latest_release}/config/stages/#{stage}" }
  8.  
  9. # SCM setup
  10. set :scm, :git
  11. set :repository, "git@mystock.com:mystock.git"
  12. set :branch, "deploy"
  13.  
  14. # SCM extra options
  15. set :git_enable_submodules, true
  16. set :repository_cache, "cached-copy"
  17. set :deploy_via, :remote_cache
  18.  
  19. # User options for the server
  20. set :runner, "rails"
  21. set :git_username, "rails"
  22. set :ssh_options, { :username => "rails" }
  23.  
  24. # Roles
  25. server "mystock.com", :app, :web
  26. role :db, "mystock.com", :primary => true
  27.  
  28. namespace :deploy do
  29. after 'deploy:setup', 'mystock:content:create_dirs'
  30. after 'deploy:update_code', 'mystock:content:symlink_dirs', 'mystock:stage:symlink_files'
  31. after 'deploy', 'sphinx:configure', 'sphinx:restart', 'sphinx:index'
  32. end
  33.  
  34. # Overrides for Phusion Passenger
  35. namespace :deploy do
  36. desc "Restarting mod_rails with restart.txt"
  37. task :restart, :roles => :app, :except => { :no_release => true } do
  38. run "touch #{current_path}/tmp/restart.txt"
  39. end
  40.  
  41. [:start, :stop].each do |t|
  42. desc "#{t} task is a no-op with mod_rails"
  43. task t, :roles => :app do ; end
  44. end
  45. end
Add Comment
Please, Sign In to add comment