Sha256: efdf44101038f2cb456c0ceeaa8f43ac87723c8ccf36db64e5ed3b6cc5eb7efd

Contents?: true

Size: 553 Bytes

Versions: 2

Compression:

Stored size: 553 Bytes

Contents

module Minke
  class DockerCompose
    @compose_file = nil

    def initialize compose_file
      @compose_file = compose_file
    end

    def up
      execute "docker-compose -f #{@compose_file} up -d"
      sleep 2
    end

    def stop
      execute "docker-compose -f #{@compose_file} stop"
    end

    def rm
      execute "echo y | docker-compose -f #{@compose_file} rm -v"
    end

    def logs
      execute "docker-compose -f #{@compose_file} logs -f"
    end

    private
    def execute command
      system("#{command}")
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
minke-0.16.0 lib/minke/docker_compose.rb
minke-0.15.0 lib/minke/docker_compose.rb