Update sample template for docker setup hook.

"kamal" network is already created (in v2.0) so the sample code is
no longer accurate.
This commit is contained in:
Wojciech Wnętrzak
2024-10-04 09:27:15 +02:00
parent 81f3508507
commit 950624d667

View File

@@ -1,13 +1,3 @@
#!/usr/bin/env ruby
#!/bin/sh
# A sample docker-setup hook
#
# Sets up a Docker network on defined hosts which can then be used by the applications 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
echo "Docker set up on $KAMAL_HOSTS..."