basecamp / kamal

Deploy web apps anywhere.
https://kamal-deploy.org
MIT License
10.6k stars 408 forks source link

Follow logs on primary role by default #1024

Closed jeromedalbert closed 2 days ago

jeromedalbert commented 2 days ago

Problem

kamal app logs -f doesn't work if the primary role is not "web".

Steps to repro:

Actual behavior:

  INFO Following logs on [REDACTED_IP]...
  ERROR (ArgumentError): No --roles match for web

Expected behavior: kamal app logs -f should not error out.

Solution

Do not default kamal app logs -f to use the hardcoded "web" role; instead use the primary role, which can be different from "web".