Class: Kuby::Docker::WebserverPhase::Puma

Inherits:
Webserver
  • Object
show all
Defined in:
lib/kuby/docker/webserver_phase.rb

Instance Attribute Summary

Attributes inherited from Webserver

#phase

Instance Method Summary collapse

Methods inherited from Webserver

#initialize

Constructor Details

This class inherits a constructor from Kuby::Docker::WebserverPhase::Webserver

Instance Method Details

#apply_to(dockerfile) ⇒ Object

T::Sig::WithoutRuntime.sig { override.params(dockerfile: Dockerfile).void }



28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/kuby/docker/webserver_phase.rb', line 28

def apply_to(dockerfile)
  dockerfile.cmd(
    'puma',
    '--workers', phase.workers.to_s,
    '--bind', 'tcp://0.0.0.0',
    '--port', phase.port.to_s,
    '--pidfile', './server.pid',
    './config.ru'
  )

  dockerfile.expose(phase.port)
end