Follow logs on primary role by default

Do not default `kamal app logs -f` to use the hardcoded “web” role;
instead use the primary role, which can be different from “web”.
This commit is contained in:
Jerome Dalbert
2024-10-01 13:08:22 -07:00
parent cd12f95a97
commit f47fd13e5b

View File

@@ -203,7 +203,7 @@ class Kamal::Cli::App < Kamal::Cli::Base
run_locally do
info "Following logs on #{KAMAL.primary_host}..."
KAMAL.specific_roles ||= [ "web" ]
KAMAL.specific_roles ||= [ KAMAL.primary_role.name ]
role = KAMAL.roles_on(KAMAL.primary_host).first
app = KAMAL.app(role: role, host: host)