Advertisement
Guest User

Untitled

a guest
Jan 20th, 2013
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Rails 1.35 KB | None | 0 0
  1. require 'bundler/capistrano'
  2.  
  3. set :application, "app"
  4. set :repository,  "/var/www/sites/app/"
  5. set :branch, "master"
  6. set :deploy_to, "/var/www/live/app"
  7. set :user, "user"
  8. default_run_options[:pty] = true
  9.  
  10. set :copy_exclude, [".git", "spec"]
  11.  
  12.  
  13. set :scm, :git # You can set :scm explicitly or Capistrano will make an intelligent guess based on known version control directory names
  14. # Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none`
  15.  
  16. set :stages, ["production"]
  17. set :default_stage, "production"
  18.  
  19. role :web, "web"                          # Your HTTP server, Apache/etc
  20. role :app, "web"                          # This may be the same as your `Web` server
  21. role :db,  "web", :primary => true    # This is where Rails migrations will run
  22.  
  23. # if you want to clean up old releases on each deploy uncomment this:
  24. set :keep_releases, 5
  25. after "deploy:update_code", "deploy:migrate", "deploy:restart", "deploy:cleanup"
  26.  
  27. # if you're still using the script/reaper helper you will need
  28. # these http://github.com/rails/irs_process_scripts
  29.  
  30. # If you are using Passenger mod_rails uncomment this:
  31. namespace :deploy do
  32.    task :start do ; end
  33.    task :stop do ; end
  34.    task :restart, :roles => :app, :except => { :no_release => true } do
  35.      run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}"
  36.    end
  37. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement