Class: Orchestration::DockerCompose::InstallGenerator

Inherits:
Object
  • Object
show all
Includes:
FileHelpers
Defined in:
lib/orchestration/docker_compose/install_generator.rb

Instance Method Summary collapse

Constructor Details

#initialize(env, terminal) ⇒ InstallGenerator

Returns a new instance of InstallGenerator.



8
9
10
11
# File 'lib/orchestration/docker_compose/install_generator.rb', line 8

def initialize(env, terminal)
  @env = env
  @terminal = terminal
end

Instance Method Details

#docker_compose_development_ymlObject



21
22
23
# File 'lib/orchestration/docker_compose/install_generator.rb', line 21

def docker_compose_development_yml
  create_compose_file(:development)
end

#docker_compose_local_ymlObject



25
26
27
# File 'lib/orchestration/docker_compose/install_generator.rb', line 25

def docker_compose_local_yml
  create_compose_file(:local)
end

#docker_compose_override_ymlObject



33
34
35
36
37
38
39
# File 'lib/orchestration/docker_compose/install_generator.rb', line 33

def docker_compose_override_yml
  simple_copy(
    'docker-compose.override.yml',
    @env.docker_compose_path(:override),
    overwrite: false
  )
end

#docker_compose_production_ymlObject



29
30
31
# File 'lib/orchestration/docker_compose/install_generator.rb', line 29

def docker_compose_production_yml
  create_compose_file(:production)
end

#docker_compose_test_ymlObject



17
18
19
# File 'lib/orchestration/docker_compose/install_generator.rb', line 17

def docker_compose_test_yml
  create_compose_file(:test)
end

#docker_compose_ymlObject



13
14
15
# File 'lib/orchestration/docker_compose/install_generator.rb', line 13

def docker_compose_yml
  create_compose_file
end

#enabled_services(environment) ⇒ Object



41
42
43
# File 'lib/orchestration/docker_compose/install_generator.rb', line 41

def enabled_services(environment)
  service_names(environment).select { |name| service_enabled?(name) }
end