Check that there's no traefik hooks left behind
This commit is contained in:
@@ -70,6 +70,7 @@ class Kamal::Configuration
|
||||
ensure_valid_kamal_version
|
||||
ensure_retain_containers_valid
|
||||
ensure_valid_service_name
|
||||
ensure_no_traefik_reboot_hooks
|
||||
end
|
||||
|
||||
|
||||
@@ -303,6 +304,16 @@ class Kamal::Configuration
|
||||
true
|
||||
end
|
||||
|
||||
def ensure_no_traefik_reboot_hooks
|
||||
hooks = %w[ pre-traefik-reboot post-traefik-reboot ].select { |hook_file| File.exist?(File.join(hooks_path, hook_file)) }
|
||||
|
||||
if hooks.any?
|
||||
raise Kamal::ConfigurationError, "Found #{hooks.join(", ")}, these should be renamed to (pre|post)-proxy-reboot"
|
||||
end
|
||||
|
||||
true
|
||||
end
|
||||
|
||||
|
||||
def role_names
|
||||
raw_config.servers.is_a?(Array) ? [ "web" ] : raw_config.servers.keys.sort
|
||||
|
||||
@@ -2,7 +2,7 @@ class Kamal::Configuration::Validator::Proxy < Kamal::Configuration::Validator
|
||||
def validate!
|
||||
super
|
||||
|
||||
if config["host"].blank? && config["ssl"]
|
||||
if config["hosts"].blank? && config["ssl"]
|
||||
error "Must set a host to enable automatic SSL"
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user