Sha256: 0f34cad3cd87f073ed74fb85a92361e12df2fe7be7b6242aba71337abc44a13b

Contents?: true

Size: 1.14 KB

Versions: 6

Compression:

Stored size: 1.14 KB

Contents

Capistrano::Configuration.instance.load do
  after "deploy:stop", "puma:stop"
  after "deploy:start", "puma:start"
  after "deploy:restart", "puma:restart"

  _cset(:puma_role)      { :app }

  namespace :puma do
    desc "Start puma"
    task :start, :roles => lambda { fetch(:puma_role) }, :on_no_matching_servers => :continue do
      puma_env = fetch(:rack_env, fetch(:rails_env, "production"))
      run "cd #{current_path} && #{fetch(:bundle_cmd, "bundle")} exec puma -d -e #{puma_env} -b 'unix://#{shared_path}/sockets/puma.sock' -S #{shared_path}/sockets/puma.state --control 'unix://#{shared_path}/sockets/pumactl.sock'", :pty => false
    end

    desc "Stop puma"
    task :stop, :roles => lambda { fetch(:puma_role) }, :on_no_matching_servers => :continue do
      run "cd #{current_path} && #{fetch(:bundle_cmd, "bundle")} exec pumactl -S #{shared_path}/sockets/puma.state stop"
    end

    desc "Restart puma"
    task :restart, :roles => lambda { fetch(:puma_role) }, :on_no_matching_servers => :continue do
      run "cd #{current_path} && #{fetch(:bundle_cmd, "bundle")} exec pumactl -S #{shared_path}/sockets/puma.state restart"
    end

  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
puma-2.0.0.b6 lib/puma/capistrano.rb
puma-2.0.0.b5 lib/puma/capistrano.rb
puma-2.0.0.b4-java lib/puma/capistrano.rb
puma-2.0.0.b4 lib/puma/capistrano.rb
puma-2.0.0.b3-java lib/puma/capistrano.rb
puma-2.0.0.b3 lib/puma/capistrano.rb