Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- encoding : utf-8 -*-
- require "bundler/capistrano"
- #require "rvm/capistrano"
- set :rvm_type, :system
- set :rvm_ruby_string, '2.0.0'
- set :application, "relacionamento.cartaconsulta.com.br"
- set :repository, "."
- set :local_repository, "."
- set :deploy_via, :copy
- set :deploy_to, "/var/apps/#{application}"
- set :checkout, "export"
- role :app, "relacionamento.cartaconsulta.com.br"
- role :web, "relacionamento.cartaconsulta.com.br"
- role :db, "relacionamento.cartaconsulta.com.br", :primary => true
- default_run_options[:pty] = true
- set :use_sudo, false
- set :user, "root"
- # 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
- # before "assets:precompile", "deploy:bundle"
- before "deploy:assets:precompile", "deploy:db_symlink"
- # 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 "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}"
- # end
- desc "Restarting mod_rails with restart.txt"
- task :restart, :roles => :app, :except => { :no_release => true } do
- run "touch #{current_path}/tmp/restart.txt"
- end
- task :start, :roles => :app, :except => { :no_release => true } do
- run "cd #{current_path} && RAILS_ENV=production unicorn_rails -c #{current_path}/config/unicorn.rb -D"
- end
- task :stop, :roles => :app, :except => { :no_release => true } do
- run "kill -s QUIT `cat /tmp/unicorn.relacionamento.cartaconsulta.com.br.pid`"
- end
- task :db_symlink do
- run "ln -nfs #{shared_path}/config/database.yml #{release_path}/config/database.yml"
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement