Merge pull request #861 from K4sku/update-docker-setup-sample-hook
Expand on docker-setup.sample hook
This commit is contained in:
@@ -1,7 +1,13 @@
|
||||
#!/bin/sh
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
# A sample docker-setup hook
|
||||
#
|
||||
# Sets up a Docker network which can then be used by the application’s containers
|
||||
# Sets up a Docker network on defined hosts which can then be used by the application’s containers
|
||||
|
||||
ssh user@example.com docker network create kamal
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user