From f47fd13e5b49969e31bb5b1eed8d0a3ef413b68b Mon Sep 17 00:00:00 2001 From: Jerome Dalbert Date: Tue, 1 Oct 2024 13:08:22 -0700 Subject: [PATCH] Follow logs on primary role by default MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Do not default `kamal app logs -f` to use the hardcoded “web” role; instead use the primary role, which can be different from “web”. --- lib/kamal/cli/app.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/kamal/cli/app.rb b/lib/kamal/cli/app.rb index 98a08f7d..74b7b4df 100644 --- a/lib/kamal/cli/app.rb +++ b/lib/kamal/cli/app.rb @@ -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)