Sha256: 91d6bc3b5b0c83af1659b9251b2b6a55127660ab87e046f72a53110d4de2afc1

Contents?: true

Size: 848 Bytes

Versions: 7

Compression:

Stored size: 848 Bytes

Contents

Capistrano::Configuration.instance.load do

  set :unicorn_binary, "bundle exec unicorn"
  set :unicorn_config, "#{current_path}/config/unicorn.production.rb"
  set :unicorn_pid, "#{current_path}/tmp/pids/unicorn.pid"

  namespace :deploy do
    task :start, :roles => :app, :except => { :no_release => true } do
      run "cd #{current_path} && #{try_sudo} #{unicorn_binary} -c #{unicorn_config} -E #{rails_env} -D"
    end
    task :stop, :roles => :app, :except => { :no_release => true } do
      run "if [ -f #{unicorn_pid} ]; then #{try_sudo} kill `cat #{unicorn_pid}`; fi"
    end
    task :graceful_stop, :roles => :app, :except => { :no_release => true } do
      run "#{try_sudo} kill -s QUIT `cat #{unicorn_pid}`"
    end
    task :restart, :roles => :app, :except => { :no_release => true } do
      stop
      start
    end
  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
ms_deploy-0.0.7 lib/ms_deploy/recipes/deploy/unicorn.rb
ms_deploy-0.0.6 lib/ms_deploy/recipes/deploy/unicorn.rb
ms_deploy-0.0.5 lib/ms_deploy/recipes/deploy/unicorn.rb
ms_deploy-0.0.4 lib/ms_deploy/recipes/deploy/unicorn.rb
ms_deploy-0.0.3 lib/ms_deploy/recipes/deploy/unicorn.rb
ms_deploy-0.0.2 lib/ms_deploy/recipes/deploy/unicorn.rb
ms_deploy-0.0.1 lib/ms_deploy/recipes/deploy/unicorn.rb