Stu Mason
Stu Mason

Activity

Issue Opened

Issue #67 opened: Add stderr + JSON logging to install/onboarding

Context

When deploying Laravel to Coolify, the default LOG_STACK=single (or daily) writes logs to files inside the container. These aren't visible in Coolify's log viewer — you only see nginx access logs.

The fix is straightforward:

LOG_STACK=daily,stderr
LOG_STDERR_FORMATTER=Monolog\Formatter\JsonFormatter

This gives you file logs for persistence AND structured JSON in Coolify's log viewer via Docker's stderr capture.

Suggestion

The coolify:install command should:

  1. Add stderr to the LOG_STACK default (or prompt the user)
  2. Set LOG_STDERR_FORMATTER=Monolog\Formatter\JsonFormatter in the generated env
  3. Mention this in the README under deployment setup

This is the standard pattern for containerised Laravel apps and every Coolify Laravel deployment benefits from it. Currently it's an easy thing to miss and you end up wondering why you can't see any app logs.