Sha256: b7c2fae6c9e9ce85c41f623395fb83975f2f95be8a5d6ad6ae4b696c65a44fa0

Contents?: true

Size: 517 Bytes

Versions: 15

Compression:

Stored size: 517 Bytes

Contents

module Kamal::Commands::App::Cord
  def cord(version:)
    pipe \
      docker(:inspect, "-f '{{ range .Mounts }}{{printf \"%s %s\\n\" .Source .Destination}}{{ end }}'", container_name(version)),
      [ :awk, "'$2 == \"#{role.cord_volume.container_path}\" {print $1}'" ]
  end

  def tie_cord(cord)
    create_empty_file(cord)
  end

  def cut_cord(cord)
    remove_directory(cord)
  end

  private
    def create_empty_file(file)
      chain \
        make_directory_for(file),
        [ :touch, file ]
    end
end

Version data entries

15 entries across 15 versions & 1 rubygems

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