INNER CODE UNIT · Ruby

ComposeManager

EugenMayer/docker-sync · lib/docker-sync/compose.rb:4

class ComposeManager
  include Thor::Shell
  @compose_session
  @global_options
  def initialize(global_options)
    @global_options = global_options

    ### production docker-compose.yml
    compose_files = [File.expand_path('docker-compose.yml')]
    if @global_options.key?('compose-file-path')
      compose_files = [] # replace
      apply_path_settings(compose_files, @global_options['compose-file-path'], 'compose-file-path')
    end

    ### development docker-compose-dev.yml
    if @global_options.key?('compose-dev-file-path')
      # explicit path given
      apply_path_settings(compose_files, @global_options['compose-dev-file-path'], 'compose-dev-file-path')

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…