Sha256: d9ccdfa5d3d6ff761b1af4fc0ac1da5d8a26fe37cac173299f8c76a9e017a476

Contents?: true

Size: 621 Bytes

Versions: 3

Compression:

Stored size: 621 Bytes

Contents

module Minke
  module Tasks
    class Run < Task

      def run args = nil
        puts "## Run application with docker compose"

        compose_file = @config.compose_file_for(@task_name)
        compose_file = File.expand_path(compose_file)
        compose = @docker_compose_factory.create compose_file unless compose_file == nil

        run_with_block do
          begin
            compose.up
            compose.logs
          rescue SystemExit, Interrupt
            puts "Stopping...."
            raise SystemExit
          ensure
            compose.down
          end
        end
      end

    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
minke-1.12.9 lib/minke/tasks/run.rb
minke-1.12.8 lib/minke/tasks/run.rb
minke-1.12.7 lib/minke/tasks/run.rb