Sha256: 0f6efe9083dc7d84374d943f420680834b7f82b0b4fb582ed798c7e0ef2865e4

Contents?: true

Size: 858 Bytes

Versions: 14

Compression:

Stored size: 858 Bytes

Contents

module Kamal::Commands::App::Execution
  def execute_in_existing_container(*command, interactive: false, env:)
    docker :exec,
      ("-it" if interactive),
      *argumentize("--env", env),
      container_name,
      *command
  end

  def execute_in_new_container(*command, interactive: false, env:)
    docker :run,
      ("-it" if interactive),
      "--rm",
      *role&.env_args(host),
      *argumentize("--env", env),
      *config.volume_args,
      *role&.option_args,
      config.absolute_image,
      *command
  end

  def execute_in_existing_container_over_ssh(*command,  env:)
    run_over_ssh execute_in_existing_container(*command, interactive: true, env: env), host: host
  end

  def execute_in_new_container_over_ssh(*command, env:)
    run_over_ssh execute_in_new_container(*command, interactive: true, env: env), host: host
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
kamal-1.9.2 lib/kamal/commands/app/execution.rb
kamal-1.9.1 lib/kamal/commands/app/execution.rb
kamal-1.9.0 lib/kamal/commands/app/execution.rb
kamal-2.0.0.alpha lib/kamal/commands/app/execution.rb
kamal-2.0.0.beta1 lib/kamal/commands/app/execution.rb
kamal-1.8.3 lib/kamal/commands/app/execution.rb
kamal-1.8.2 lib/kamal/commands/app/execution.rb
kamal-1.8.1 lib/kamal/commands/app/execution.rb
kamal-1.8.0 lib/kamal/commands/app/execution.rb
kamal-1.7.3 lib/kamal/commands/app/execution.rb
kamal-1.7.2 lib/kamal/commands/app/execution.rb
kamal-1.7.1 lib/kamal/commands/app/execution.rb
kamal-1.7.0 lib/kamal/commands/app/execution.rb
kamal-1.6.0 lib/kamal/commands/app/execution.rb