Class: Kuby::Docker::WebserverPhase::Puma
- Inherits:
-
Object
- Object
- Kuby::Docker::WebserverPhase::Puma
- Defined in:
- lib/kuby/docker/webserver_phase.rb
Instance Attribute Summary collapse
-
#phase ⇒ Object
readonly
Returns the value of attribute phase.
Instance Method Summary collapse
- #apply_to(dockerfile) ⇒ Object
-
#initialize(phase) ⇒ Puma
constructor
A new instance of Puma.
Constructor Details
#initialize(phase) ⇒ Puma
Returns a new instance of Puma.
7 8 9 |
# File 'lib/kuby/docker/webserver_phase.rb', line 7 def initialize(phase) @phase = phase end |
Instance Attribute Details
#phase ⇒ Object (readonly)
Returns the value of attribute phase.
5 6 7 |
# File 'lib/kuby/docker/webserver_phase.rb', line 5 def phase @phase end |
Instance Method Details
#apply_to(dockerfile) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/kuby/docker/webserver_phase.rb', line 11 def apply_to(dockerfile) dockerfile.cmd( 'puma', '--workers', '4', '--bind', 'tcp://0.0.0.0', '--port', phase.port, '--pidfile', './server.pid', './config.ru' ) dockerfile.expose(phase.port) end |