Class: ChatopsDeployer::Container
- Inherits:
-
Object
- Object
- ChatopsDeployer::Container
- Includes:
- Logger
- Defined in:
- lib/chatops_deployer/container.rb
Defined Under Namespace
Classes: Error
Instance Attribute Summary collapse
-
#urls ⇒ Object
readonly
Returns the value of attribute urls.
Instance Method Summary collapse
- #build ⇒ Object
- #destroy ⇒ Object
-
#initialize(project) ⇒ Container
constructor
A new instance of Container.
Methods included from Logger
Constructor Details
#initialize(project) ⇒ Container
Returns a new instance of Container.
13 14 15 16 17 |
# File 'lib/chatops_deployer/container.rb', line 13 def initialize(project) @sha1 = project.sha1 @urls = {} @project = project end |
Instance Attribute Details
#urls ⇒ Object (readonly)
Returns the value of attribute urls.
12 13 14 |
# File 'lib/chatops_deployer/container.rb', line 12 def urls @urls end |
Instance Method Details
#build ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/chatops_deployer/container.rb', line 19 def build @config = @project.config create_docker_machine setup_docker_environment docker_compose_run_commands docker_compose_up end |
#destroy ⇒ Object
27 28 29 30 |
# File 'lib/chatops_deployer/container.rb', line 27 def destroy raise_error("Cannot destroy VM because it doesn't exist") unless vm_exists? destroy_vm end |