Sha256: c5174b40cbe22e327ebcd3d2a322a2c3e44238f1402a862ad9e13a5abd36d557

Contents?: true

Size: 1.17 KB

Versions: 4

Compression:

Stored size: 1.17 KB

Contents

# these cannot be overriden
set(:thin_script) { File.join(bin_path, "thin") }
set(:thin_service) { File.join(units_path, "thin.service") }
set(:thin_pidfile) { File.join(pid_path, "thin.pid") }

_cset(:thin_port, 3000)

after "deploy:update_code", "thin:setup"
after "deploy:restart", "thin:restart"
after "deploy:start", "thin:start"
after "deploy:stop", "thin:stop"

namespace :thin do
  desc "Generate thin configuration files"
  task :setup, :roles => :app, :except => { :no_release => true } do
    upload_template_file("thin.sh",
                         thin_script,
                         :mode => "0755")
    upload_template_file("thin.service",
                         thin_service,
                         :mode => "0755")
    systemctl "daemon-reload"
    systemctl :enable, :thin
  end

  desc "Start thin"
  task :start, :roles => :app, :except => { :no_release => true } do
    systemctl :start, :thin
  end

  desc "Stop thin"
  task :stop, :roles => :app, :except => { :no_release => true } do
    systemctl :stop, :thin
  end

  desc "Restart thin with zero downtime"
  task :restart, :roles => :app, :except => { :no_release => true } do
    systemctl :restart, :thin
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
capper-2.0.0 lib/capper/thin.rb
capper-2.0.0.rc3 lib/capper/thin.rb
capper-2.0.0.rc2 lib/capper/thin.rb
capper-2.0.0.rc1 lib/capper/thin.rb