Class: Wellcar::Templates::DockerStack

Inherits:
Base
  • Object
show all
Defined in:
lib/wellcar/templates/docker_stack.rb

Instance Method Summary collapse

Methods inherited from Base

#exist?, #render, #write

Constructor Details

#initialize(app_name, repo_account) ⇒ DockerStack

Returns a new instance of DockerStack.



6
7
8
9
10
11
12
# File 'lib/wellcar/templates/docker_stack.rb', line 6

def initialize(app_name, )
  super "docker-stack.yml"
  with_attributes app_name: app_name,
    repo_account: ,
    registry_url: "docker.pkg.github.com"
  with_template "docker-stack.yml.erb"
end

Instance Method Details

#image_pathObject



14
15
16
# File 'lib/wellcar/templates/docker_stack.rb', line 14

def image_path
  [registry_url, , app_name, "web"].join "/"
end

#proxy_image_pathObject



18
19
20
# File 'lib/wellcar/templates/docker_stack.rb', line 18

def proxy_image_path
  [registry_url, , app_name, "nginx"].join "/"
end