Sha256: 52841b093a10fa1d04c3cd2c7ec2f0a6e67788af71ee1ce245207b687c7cf1bd

Contents?: true

Size: 708 Bytes

Versions: 2

Compression:

Stored size: 708 Bytes

Contents

module Gaku
  class Container
    def self.Start
      _exe 'docker-compose up -d'
    end

    def self.Stop
      _exe 'docker-compose down'
    end

    def self.Delete
      _exe 'docker-compose down -v'
    end

    def self.Console
      _exe 'docker-compose exec web bundle exec rails console'
    end

    def self.Terminal
      _exe 'docker-compose exec web bundle exec /bin/bash'
    end

    def self.Sample
      _exe 'docker-compose exec  web bundle exec rake db:sample'
    end

    def self.Detach
      _exe 'docker-compose up -d'
    end

    def self._goto_root_dir
      "cd #{__dir__}/../../"
    end

    def self._exe(command)
      `#{_goto_root_dir} && #{command}`
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
gaku-0.3.0.pre.1 lib/gaku/container.rb
gaku-0.3.0.pre.0 lib/gaku/container.rb