14 lines
359 B
Ruby
Executable File
14 lines
359 B
Ruby
Executable File
#!/usr/bin/env ruby
|
||
|
||
# A sample docker-setup hook
|
||
#
|
||
# Sets up a Docker network on defined hosts which can then be used by the application’s containers
|
||
|
||
hosts = ENV["KAMAL_HOSTS"].split(",")
|
||
|
||
hosts.each do |ip|
|
||
destination = "root@#{ip}"
|
||
puts "Creating a Docker network \"kamal\" on #{destination}"
|
||
`ssh #{destination} docker network create kamal`
|
||
end
|