Sha256: 8aa8369556f609d1e9bdcfc1b35167957b62340c0c47712d3a3d7308f253605b

Contents?: true

Size: 526 Bytes

Versions: 5

Compression:

Stored size: 526 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_config.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

5 entries across 5 versions & 1 rubygems

Version Path
kamal-1.3.1 lib/kamal/commands/app/cord.rb
kamal-1.3.0 lib/kamal/commands/app/cord.rb
kamal-1.2.0 lib/kamal/commands/app/cord.rb
kamal-1.1.0 lib/kamal/commands/app/cord.rb
kamal-1.0.0 lib/kamal/commands/app/cord.rb