Class: Dolphin::Puma

Inherits:
Base
  • Object
show all
Defined in:
lib/dolphin/puma.rb

Overview

Puma related commands

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Dolphin::Base

Instance Method Details

#restartObject



29
30
31
32
33
34
35
36
37
38
39
# File 'lib/dolphin/puma.rb', line 29

def restart
  menu = [
    "
      cd #{@deploy_dir}
      RAILS_ENV=#{@env} bundle exec pumactl -S #{@pids}/#{@application}.state restart
      # kill -s SIGUSR2 `cat #{@pids}/#{@application}.pid`
    ",
  ]

  execute menu
end

#startObject



5
6
7
8
9
10
11
12
13
14
# File 'lib/dolphin/puma.rb', line 5

def start
  menu = [
    "
      cd #{@deploy_dir}
      RAILS_ENV=#{@env} bundle exec puma -C #{@deploy_dir}/config/puma.rb
    ",
  ]

  execute menu
end

#stopObject



17
18
19
20
21
22
23
24
25
26
# File 'lib/dolphin/puma.rb', line 17

def stop
  menu = [
    "
      cd #{@deploy_dir}
      RAILS_ENV=#{@env} bundle exec pumactl -S #{@pids}/#{@application}.state stop
    ",
  ]

  execute menu
end