Class: Orchestration::DockerCompose::MongoService

Inherits:
Object
  • Object
show all
Defined in:
lib/orchestration/docker_compose/mongo_service.rb

Constant Summary collapse

PORT =
27_020

Instance Method Summary collapse

Constructor Details

#initialize(config, environment) ⇒ MongoService

Returns a new instance of MongoService.



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

def initialize(config, environment)
  @config = config
  @environment = environment
end

Instance Method Details

#definitionObject



13
14
15
16
17
# File 'lib/orchestration/docker_compose/mongo_service.rb', line 13

def definition
  return nil unless @config.enabled?

  { 'image' => 'library/mongo' }.merge(ports).merge(volumes)
end