Do not invoke healthcheck on deploy when no web role

This commit is contained in:
Yoel Cabo
2023-11-14 11:29:07 +01:00
parent 87cb8c1f71
commit 887b7dd46d
5 changed files with 27 additions and 6 deletions

View File

@@ -38,8 +38,10 @@ class Kamal::Cli::Main < Kamal::Cli::Base
say "Ensure Traefik is running...", :magenta
invoke "kamal:cli:traefik:boot", [], invoke_options
say "Ensure app can pass healthcheck...", :magenta
invoke "kamal:cli:healthcheck:perform", [], invoke_options
if KAMAL.config.primary_role.running_traefik?
say "Ensure app can pass healthcheck...", :magenta
invoke "kamal:cli:healthcheck:perform", [], invoke_options
end
say "Detect stale containers...", :magenta
invoke "kamal:cli:app:stale_containers", [], invoke_options.merge(stop: true)