Sha256: cccb687be3f387d0844f1410a95d81c61e67e7b42e50e860463ccdd5f175bab6

Contents?: true

Size: 610 Bytes

Versions: 5

Compression:

Stored size: 610 Bytes

Contents

# frozen_string_literal: true

module Neptuno
  module Docker
    class Log < Neptuno::CLI::Base
      include ::Neptuno::TTY::Config
      desc "Docker: Show a container's log"

      def call(**options)
        command_service_to('log', service_as_args: options[:args].first) do |service, project|
          success = system("cd #{neptuno_path} && docker logs -f #{project}_#{service}_1")
          unless success
            puts "Trying #{project}-#{services.first}-1"
            system("cd #{neptuno_path} && docker logs -f #{project}-#{service}-1")
          end
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
neptuno-1.0.10 lib/neptuno/docker/log.rb
neptuno-1.0.9 lib/neptuno/docker/log.rb
neptuno-1.0.8 lib/neptuno/docker/log.rb
neptuno-1.0.7 lib/neptuno/docker/log.rb
neptuno-1.0.6 lib/neptuno/docker/log.rb