Skip to content

Commit

Permalink
Merge pull request #1050 from tiramizoo/template-docker-setup
Browse files Browse the repository at this point in the history
Update sample template for docker setup hook.
  • Loading branch information
dhh authored Oct 4, 2024
2 parents 5ca806f + 950624d commit 8019158
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 8019158

Please sign in to comment.