Sha256: 3cd3386173ccb9cf87291509fb6421165a0729284691a6dfc402d3722ee62bf9

Contents?: true

Size: 955 Bytes

Versions: 9

Compression:

Stored size: 955 Bytes

Contents

require 'bundler'
module EtFullSystem
  #!/usr/bin/env ruby
  # frozen_string_literal: true
  module Cli
    module Docker
      class ServerCommand < Thor
        BEFORE_BOOT_SCRIPT =
        desc "up", "Starts the full system server on docker"
        def up(*args)
          Bundler.with_original_env do
            gem_root = File.absolute_path('../../../..', __dir__)
            cmd = "docker-compose -f #{gem_root}/docker/docker-compose.yml up #{args.join(' ')}"
            puts cmd
            exec(cmd)
          end
        end

        desc "down", "Stops the full system server on docker"
        def down(*args)
          ::Bundler.with_original_env do
            gem_root = File.absolute_path('../../../..', __dir__)
            cmd = "docker-compose -f #{gem_root}/docker/docker-compose.yml down #{args.join(' ')}"
            puts cmd
            exec(cmd)
          end
        end

        default_task :up
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
et_full_system-0.1.33 lib/et_full_system/cli/docker/server.rb
et_full_system-0.1.32 lib/et_full_system/cli/docker/server.rb
et_full_system-0.1.31 lib/et_full_system/cli/docker/server.rb
et_full_system-0.1.28 lib/et_full_system/cli/docker/server.rb
et_full_system-0.1.27 lib/et_full_system/cli/docker/server.rb
et_full_system-0.1.26 lib/et_full_system/cli/docker/server.rb
et_full_system-0.1.25 lib/et_full_system/cli/docker/server.rb
et_full_system-0.1.24 lib/et_full_system/cli/docker/server.rb
et_full_system-0.1.23 lib/et_full_system/cli/docker/server.rb