PageRenderTime 51ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/config/deploy.rb

https://bitbucket.org/kimoto/capistrano-sample
Ruby | 37 lines | 21 code | 8 blank | 8 comment | 0 complexity | 25b537d05b2de77b5e217b39f2c2a072 MD5 | raw file
  1. require 'capistrano/ext/multistage'
  2. set :application, "capistrano sample"
  3. set :repository, "git@bitbucket.org:kimoto/capistrano-sample.git"
  4. # set :scm, :git # You can set :scm explicitly or Capistrano will make an intelligent guess based on known version control directory names
  5. # Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none`
  6. role :web, "localhost" # Your HTTP server, Apache/etc
  7. role :app, "localhost" # This may be the same as your `Web` server
  8. role :db, "localhost", :primary => true # This is where Rails migrations will run
  9. #role :db, "your slave db-server here"
  10. # if you want to clean up old releases on each deploy uncomment this:
  11. # after "deploy:restart", "deploy:cleanup"
  12. # if you're still using the script/reaper helper you will need
  13. # these http://github.com/rails/irs_process_scripts
  14. set :user, 'kimoto'
  15. set :group, 'users'
  16. set :use_sudo, false
  17. default_run_options[:pty] = true
  18. set :default_environment, {
  19. 'PATH' => "$HOME/.rbenv/shims:$HOME/.rbenv/bin:$PATH"
  20. }
  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 "cd #{current_path} && rake assets:precompile"
  27. run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}"
  28. end
  29. end