Class: GrokCLI::Docker::WordPress::Up

Inherits:
Object
  • Object
show all
Defined in:
lib/grok_cli/docker/wordpress/up.rb

Instance Method Summary collapse

Constructor Details

#initialize(config = GrokCLI::Docker::Configuration.new) ⇒ Up

Returns a new instance of Up.



3
4
5
# File 'lib/grok_cli/docker/wordpress/up.rb', line 3

def initialize(config = GrokCLI::Docker::Configuration.new)
  @config = config
end

Instance Method Details

#executeObject



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/grok_cli/docker/wordpress/up.rb', line 7

def execute
  GrokCLI::Docker::Boot.new.execute
  GrokCLI::Docker::UpdateEtcHosts.new.execute

  system <<~CMD

    eval "$(docker-machine env #{@config.machine_name})"

    docker-compose up
  CMD
end