Class: DockerDeploy::LocalStage

Inherits:
Stage
  • Object
show all
Defined in:
lib/docker_deploy/local_stage.rb

Instance Attribute Summary

Attributes inherited from Stage

#container, #deploy, #env_files, #links, #name, #servers, #services, #variables

Instance Method Summary collapse

Methods inherited from Stage

#env, #env_file, #host, #link, #link_mappings, #options, #port, #port_mappings, #service

Constructor Details

#initialize(context) ⇒ LocalStage

Returns a new instance of LocalStage.



3
4
5
6
7
# File 'lib/docker_deploy/local_stage.rb', line 3

def initialize(context)
  super(context, :local)
  @servers = []
  @deploy = ["docker:build", :restart]
end

Instance Method Details

#run(cmd) ⇒ Object Also known as: shell



13
14
15
# File 'lib/docker_deploy/local_stage.rb', line 13

def run(cmd)
  sh(cmd)
end

#server(server) ⇒ Object



9
10
11
# File 'lib/docker_deploy/local_stage.rb', line 9

def server(server)
  @servers << SSHKit::Host.new(server)
end