Sha256: 101c2431de8b2dafc9771189eeb8bd0c0b2506a1d832a9797f576b09126ddb4c

Contents?: true

Size: 629 Bytes

Versions: 23

Compression:

Stored size: 629 Bytes

Contents

# frozen_string_literal: true

module Orchestration
  module DockerCompose
    class RabbitMQService
      include ComposeHelpers

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

      def definition
        return nil unless @config.enabled?

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

      def ports
        return {} unless %i[development test].include?(@environment)

        container_port = Orchestration::Services::RabbitMQ::PORT

        { 'ports' => ["#{sidecar_port(@environment)}#{container_port}"] }
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
orchestration-0.5.12 lib/orchestration/docker_compose/rabbitmq_service.rb
orchestration-0.5.11 lib/orchestration/docker_compose/rabbitmq_service.rb
orchestration-0.5.10 lib/orchestration/docker_compose/rabbitmq_service.rb
orchestration-0.5.9 lib/orchestration/docker_compose/rabbitmq_service.rb
orchestration-0.5.8 lib/orchestration/docker_compose/rabbitmq_service.rb
orchestration-0.5.7 lib/orchestration/docker_compose/rabbitmq_service.rb
orchestration-0.5.6 lib/orchestration/docker_compose/rabbitmq_service.rb
orchestration-0.5.5 lib/orchestration/docker_compose/rabbitmq_service.rb
orchestration-0.5.4 lib/orchestration/docker_compose/rabbitmq_service.rb
orchestration-0.5.3 lib/orchestration/docker_compose/rabbitmq_service.rb
orchestration-0.5.2 lib/orchestration/docker_compose/rabbitmq_service.rb
orchestration-0.5.1 lib/orchestration/docker_compose/rabbitmq_service.rb
orchestration-0.5.0 lib/orchestration/docker_compose/rabbitmq_service.rb
orchestration-0.4.21 lib/orchestration/docker_compose/rabbitmq_service.rb
orchestration-0.4.20 lib/orchestration/docker_compose/rabbitmq_service.rb
orchestration-0.4.19 lib/orchestration/docker_compose/rabbitmq_service.rb
orchestration-0.4.18 lib/orchestration/docker_compose/rabbitmq_service.rb
orchestration-0.4.17 lib/orchestration/docker_compose/rabbitmq_service.rb
orchestration-0.4.16 lib/orchestration/docker_compose/rabbitmq_service.rb
orchestration-0.4.15 lib/orchestration/docker_compose/rabbitmq_service.rb