Add docker-setup hook

This allows the user to make any necessary configuration changes to
Docker before setting up any containers, allowing those configuration
changes to take effect from the outset.
This commit is contained in:
Trevor Vallender
2023-11-07 15:43:30 +00:00
parent 6563393d9a
commit f69c45b7ea
4 changed files with 15 additions and 0 deletions

View File

@@ -19,5 +19,7 @@ class Kamal::Cli::Server < Kamal::Cli::Base
if missing.any?
raise "Docker is not installed on #{missing.join(", ")} and can't be automatically installed without having root access and the `curl` command available. Install Docker manually: https://docs.docker.com/engine/install/"
end
run_hook "docker-setup"
end
end

View File

@@ -0,0 +1,7 @@
#!/usr/bin/env ruby
# A sample docker-setup hook
#
# Sets up a Docker network which can then be used by the applications containers
ssh user@example.com docker network create kamal