/config/deploy.rb
Ruby | 37 lines | 21 code | 8 blank | 8 comment | 0 complexity | 25b537d05b2de77b5e217b39f2c2a072 MD5 | raw file
- require 'capistrano/ext/multistage'
- set :application, "capistrano sample"
- set :repository, "git@bitbucket.org:kimoto/capistrano-sample.git"
- # set :scm, :git # You can set :scm explicitly or Capistrano will make an intelligent guess based on known version control directory names
- # Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none`
- role :web, "localhost" # Your HTTP server, Apache/etc
- role :app, "localhost" # This may be the same as your `Web` server
- role :db, "localhost", :primary => true # This is where Rails migrations will run
- #role :db, "your slave db-server here"
- # if you want to clean up old releases on each deploy uncomment this:
- # after "deploy:restart", "deploy:cleanup"
- # if you're still using the script/reaper helper you will need
- # these http://github.com/rails/irs_process_scripts
- set :user, 'kimoto'
- set :group, 'users'
- set :use_sudo, false
- default_run_options[:pty] = true
- set :default_environment, {
- 'PATH' => "$HOME/.rbenv/shims:$HOME/.rbenv/bin:$PATH"
- }
- # If you are using Passenger mod_rails uncomment this:
- namespace :deploy do
- task :start do; end
- task :stop do; end
- task :restart, :roles => :app, :except => { :no_release => true } do
- run "cd #{current_path} && rake assets:precompile"
- run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}"
- end
- end