Skip to content

Commit

Permalink
Update sample template for docker setup hook.
Browse files Browse the repository at this point in the history
"kamal" network is already created (in v2.0) so the sample code is
no longer accurate.
  • Loading branch information
morgoth committed Oct 4, 2024
1 parent 81f3508 commit 950624d
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions lib/kamal/cli/templates/sample_hooks/docker-setup.sample
Original file line number Diff line number Diff line change
@@ -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 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
echo "Docker set up on $KAMAL_HOSTS..."

0 comments on commit 950624d

Please sign in to comment.