Use local docker registry to push and pull app images

This commit is contained in:
T. R. Bernstein
2025-08-29 16:55:50 +02:00
parent 18f1bbbeac
commit 95cbc62ef1
24 changed files with 352 additions and 64 deletions

View File

@@ -43,6 +43,19 @@ class ConfigurationTest < ActiveSupport::TestCase
end
end
test "image uses service name if registry is local" do
assert_equal "app", Kamal::Configuration.new(@deploy.tap {
_1[:registry] = { "server" => "localhost:5000" }
_1.delete(:image)
}).image
end
test "image uses image if registry is local" do
assert_equal "dhh/app", Kamal::Configuration.new(@deploy.tap {
_1[:registry] = { "server" => "localhost:5000" }
}).image
end
test "service name valid" do
assert_nothing_raised do
Kamal::Configuration.new(@deploy.tap { |config| config[:service] = "hey-app1_primary" })