Stu Mason
Stu Mason

Activity

Pull Request Merged

PR #19 merged: feat: improve provisioning experience with better defaults

Summary

This PR addresses several issues to improve the provisioning experience:

  • #11 - Fix confusing webhook UX by using pause() instead of Yes/No prompt
  • #12 - Configure TrustProxies middleware in bootstrap/app.php during install
  • #14 - Auto-generate Reverb credentials if not present locally, set BROADCAST_CONNECTION=reverb
  • #15 - Enable health checks by default with /up path (Laravel 11+ default)
  • #16 - Add LOG_STACK=daily and LOG_DAILY_MAX_FILES=7 for better log management

Changes

ProvisionCommand.php

  1. Webhook prompt UX - Changed from confusing confirm('Have you set up the webhook?') to simple pause('Press ENTER once you have set up the webhook...') matching the deploy key pattern

  2. Broadcasting/Reverb - Now auto-generates REVERB_APP_ID, REVERB_APP_KEY, REVERB_APP_SECRET if not present in local .env, and always sets production-appropriate values for REVERB_HOST, REVERB_PORT, REVERB_SCHEME

  3. Health Checks - Added health check configuration to application creation payload:

    • health_check_enabled: true
    • health_check_path: '/up'
    • health_check_method: 'GET'
    • health_check_return_code: 200
  4. Log Management - Added sensible defaults to prevent runaway log files:

    • LOG_STACK=daily
    • LOG_DAILY_MAX_FILES=7

InstallCommand.php

  1. TrustProxies Configuration - During coolify:install, modifies bootstrap/app.php to add $middleware->trustProxies(at: '*') inside the withMiddleware callback. This properly configures Laravel to trust Coolify's reverse proxy.

Test plan

  • All existing tests pass
  • Lint passes
  • Manual test of coolify:install command
  • Manual test of coolify:provision command

Closes #11, #12, #14, #15, #16

Stu Mason + AI [email protected]

+86
additions
-16
deletions
2
files changed