Sha256: 2587c2c66b0afad622ca5b9c69d35527d57b021ae71d4368f45a2a99c5d91858

Contents?: true

Size: 1.11 KB

Versions: 20

Compression:

Stored size: 1.11 KB

Contents

namespace :rubber do

  namespace :unicorn do

    rubber.allow_optional_tasks(self)

    before "deploy:stop", "rubber:unicorn:stop"
    after "deploy:start", "rubber:unicorn:start"
    after "deploy:restart", "rubber:unicorn:upgrade"

    desc "Stops the unicorn server"
    task :stop, :roles => :unicorn do
      rsudo "service unicorn stop"
    end

    desc "Starts the unicorn server"
    task :start, :roles => :unicorn do
      rsudo "service unicorn start"
    end

    desc "Restarts the unicorn server"
    task :restart, :roles => :unicorn do
      rsudo "service unicorn restart"
    end

    desc "Reloads the unicorn web server"
    task :upgrade, :roles => :unicorn do
      rsudo "service unicorn upgrade"
    end

    desc "Forcefully kills the unicorn server"
    task :kill, :roles => :unicorn do
      rsudo "service unicorn kill"
    end

    desc "Display status of the unicorn web server"
    task :status, :roles => :unicorn do
      rsudo "service unicorn status || true"
      rsudo "ps -eopid,user,cmd | grep [u]nicorn || true"
      # rsudo "netstat -tupan | grep unicorn || true"
    end

  end

end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
rubber-3.2.2 templates/unicorn/config/rubber/deploy-unicorn.rb
rubber-3.2.1 templates/unicorn/config/rubber/deploy-unicorn.rb
rubber-3.2.0 templates/unicorn/config/rubber/deploy-unicorn.rb
rubber-3.1.0 templates/unicorn/config/rubber/deploy-unicorn.rb
rubber-3.0.1 templates/unicorn/config/rubber/deploy-unicorn.rb
rubber-3.0.0 templates/unicorn/config/rubber/deploy-unicorn.rb
rubber-2.16.0 templates/unicorn/config/rubber/deploy-unicorn.rb
rubber-2.15.2 templates/unicorn/config/rubber/deploy-unicorn.rb
rubber-2.15.1 templates/unicorn/config/rubber/deploy-unicorn.rb
rubber-2.15.0 templates/unicorn/config/rubber/deploy-unicorn.rb
rubber-2.14.0 templates/unicorn/config/rubber/deploy-unicorn.rb
rubber-2.13.1 templates/unicorn/config/rubber/deploy-unicorn.rb
rubber-2.13.0 templates/unicorn/config/rubber/deploy-unicorn.rb
rubber-2.12.2 templates/unicorn/config/rubber/deploy-unicorn.rb
rubber-2.12.1 templates/unicorn/config/rubber/deploy-unicorn.rb
rubber-2.12.0 templates/unicorn/config/rubber/deploy-unicorn.rb
rubber-2.11.0 templates/unicorn/config/rubber/deploy-unicorn.rb
rubber-2.10.2 templates/unicorn/config/rubber/deploy-unicorn.rb
rubber-2.10.1 templates/unicorn/config/rubber/deploy-unicorn.rb
rubber-2.10.0 templates/unicorn/config/rubber/deploy-unicorn.rb