PageRenderTime 79ms CodeModel.GetById 27ms RepoModel.GetById 1ms app.codeStats 0ms

/config/deploy.rb

https://bitbucket.org/3david/superduster
Ruby | 47 lines | 24 code | 10 blank | 13 comment | 0 complexity | e95b99943e6668bae804335f2a0262c6 MD5 | raw file
  1. $:.unshift(File.expand_path('./lib', ENV['rvm_path']))
  2. require 'bundler/capistrano'
  3. require 'rvm/capistrano'
  4. require 'capistrano_colors'
  5. set :rvm_ruby_string, '1.9.3'
  6. set :rvm_type, :user
  7. set :application, "superduster"
  8. set :repository, "git@bitbucket.org:3david/superduster.git"
  9. set :branch, "master"
  10. set :deploy_to, "/var/www/#{application}"
  11. set :scm, :git
  12. # Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none`
  13. set :user, "www-data"
  14. set :port, 5776
  15. role :web, "elentok.com" # Your HTTP server, Apache/etc
  16. role :app, "elentok.com" # This may be the same as your `Web` server
  17. role :db, "elentok.com", :primary => true # This is where Rails migrations will run
  18. #role :db, "your slave db-server here"
  19. # if you're still using the script/reaper helper you will need
  20. # these http://github.com/rails/irs_process_scripts
  21. # If you are using Passenger mod_rails uncomment this:
  22. # namespace :deploy do
  23. # task :start do ; end
  24. # task :stop do ; end
  25. # task :restart, :roles => :app, :except => { :no_release => true } do
  26. # run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}"
  27. # end
  28. # end
  29. namespace :deploy do
  30. task :start do ; end
  31. task :stop do ; end
  32. task :restart, :roles => :app, :except => { :no_release => true } do
  33. #run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}"
  34. run "touch #{File.join(current_path,'tmp','restart.txt')}"
  35. end
  36. end
  37. ssh_options[:forward_agent] = true