Sha256: 4dfc6fdfaf6ed2f67ce84ace03966e12da3a866f0853461b22bbc0aa25eaaa25

Contents?: true

Size: 712 Bytes

Versions: 16

Compression:

Stored size: 712 Bytes

Contents

module Minke
  module Tasks
    class Run < Task

      def run args = nil
        @logger.info "## 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 |pre_func, post_func|
          begin
            compose.up
            pre_func.call
            compose.logs
          rescue SystemExit, Interrupt
            @logger.info "Stopping...."
            raise SystemExit
          ensure
            compose.down
            post_func.call
          end
        end
      end

    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
minke-1.15.0 lib/minke/tasks/run.rb
minke-1.14.5 lib/minke/tasks/run.rb
minke-1.14.4 lib/minke/tasks/run.rb
minke-1.14.3 lib/minke/tasks/run.rb
minke-1.14.2 lib/minke/tasks/run.rb
minke-1.14.1 lib/minke/tasks/run.rb
minke-1.14.0 lib/minke/tasks/run.rb
minke-1.13.20 lib/minke/tasks/run.rb
minke-1.13.19 lib/minke/tasks/run.rb
minke-1.13.18 lib/minke/tasks/run.rb
minke-1.13.16 lib/minke/tasks/run.rb
minke-1.13.15 lib/minke/tasks/run.rb
minke-1.13.14 lib/minke/tasks/run.rb
minke-1.13.13 lib/minke/tasks/run.rb
minke-1.13.12 lib/minke/tasks/run.rb
minke-1.13.11 lib/minke/tasks/run.rb