Module: Orchestration::DockerCompose::ComposeHelpers
- Included in:
- DatabaseService, MongoService, RabbitMQService
- Defined in:
- lib/orchestration/docker_compose/compose_helpers.rb
Instance Method Summary collapse
Instance Method Details
#sidecar_port(environment) ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/orchestration/docker_compose/compose_helpers.rb', line 6 def sidecar_port(environment) port = Orchestration.random_local_port return "#{port}:" unless environment == :test # If env var `sidecar` is not set then ports will be configured as e.g.: # "50123:3306" # otherwise it will be: # "3306" (docker will use an ephemeral host port which we will not use) "${sidecar-#{port}:}" end |