Class: Pygmy::Haproxy

Inherits:
Object
  • Object
show all
Extended by:
DockerService
Defined in:
lib/pygmy/haproxy.rb

Class Method Summary collapse

Methods included from DockerService

container_exists?, delete, has_docker_client?, ps, pull, running?, start, start_cmd, stop

Class Method Details

.container_nameObject



11
12
13
# File 'lib/pygmy/haproxy.rb', line 11

def self.container_name
  'amazeeio-haproxy'
end

.image_nameObject



7
8
9
# File 'lib/pygmy/haproxy.rb', line 7

def self.image_name
  'amazeeio/haproxy'
end

.run_cmdObject



15
16
17
18
19
20
21
22
# File 'lib/pygmy/haproxy.rb', line 15

def self.run_cmd
  "docker run -d " \
  "-p 80:80 -p 443:443 " \
  "--volume=/var/run/docker.sock:/tmp/docker.sock " \
  "--restart=always " \
  "--name=#{Shellwords.escape(self.container_name)} " \
  "#{Shellwords.escape(self.image_name)}"
end