Class: Pygmy::Haproxy
Class Method Summary
collapse
container_exists?, delete, has_docker_client?, ps, pull, running?, start, start_cmd, stop
Class Method Details
.container_name ⇒ Object
11
12
13
|
# File 'lib/pygmy/haproxy.rb', line 11
def self.container_name
'amazeeio-haproxy'
end
|
.image_name ⇒ Object
7
8
9
|
# File 'lib/pygmy/haproxy.rb', line 7
def self.image_name
'amazeeio/haproxy'
end
|
.run_cmd ⇒ Object
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
|