Sha256: 1cde2235aead42838610d709ce0d1dc6e9c8562a653853abfff4dbee3b0d4a0e

Contents?: true

Size: 1.14 KB

Versions: 9

Compression:

Stored size: 1.14 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:reload"

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

    desc "Forcefully kills the unicorn server"
    task :force_stop, :roles => :unicorn do
      rsudo "service unicorn force-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 :reload, :roles => :unicorn do
      rsudo "service unicorn upgrade"
    end


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

  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rubber-2.9.0 templates/unicorn/config/rubber/deploy-unicorn.rb
rubber-2.8.1 templates/unicorn/config/rubber/deploy-unicorn.rb
rubber-2.8.0 templates/unicorn/config/rubber/deploy-unicorn.rb
rubber-2.7.5 templates/unicorn/config/rubber/deploy-unicorn.rb
rubber-2.7.4 templates/unicorn/config/rubber/deploy-unicorn.rb
rubber-2.7.3 templates/unicorn/config/rubber/deploy-unicorn.rb
rubber-2.7.2 templates/unicorn/config/rubber/deploy-unicorn.rb
rubber-2.7.1 templates/unicorn/config/rubber/deploy-unicorn.rb
rubber-2.7.0 templates/unicorn/config/rubber/deploy-unicorn.rb