Issue Resolved
Issue #14 closed: Add Pusher/Broadcasting environment variables to stack provisioning
Problem
When deploying a Laravel application with broadcasting enabled (e.g., using Laravel Reverb or Pusher), the application fails with:
app-BG8-Nn95.js:90 Uncaught You must pass your app key when you instantiate Pusher.
This happens because the Coolify stack provisioning doesn't include the necessary Pusher/broadcasting environment variables.
Related Issue
Required Environment Variables
The following environment variables need to be provisioned when setting up a stack:
Core Broadcasting Config
BROADCAST_CONNECTION=reverb
Reverb Server Config
REVERB_APP_ID=<generated>
REVERB_APP_KEY=<generated>
REVERB_APP_SECRET=<generated>
REVERB_HOST="localhost"
REVERB_PORT=8080
REVERB_SCHEME=http
Vite/Frontend Config (exposed to browser)
VITE_REVERB_APP_KEY="${REVERB_APP_KEY}"
VITE_REVERB_HOST="${REVERB_HOST}"
VITE_REVERB_PORT="${REVERB_PORT}"
VITE_REVERB_SCHEME="${REVERB_SCHEME}"
Proposed Solution
- Add option to enable broadcasting when provisioning a stack
- Auto-generate
REVERB_APP_ID,REVERB_APP_KEY, andREVERB_APP_SECRET(similar to howAPP_KEYis generated) - Set sensible defaults for host/port/scheme based on deployment environment
- Ensure the
VITE_*variables reference the Reverb variables so they stay in sync
Notes
- For production deployments,
REVERB_HOSTshould be the public domain REVERB_SCHEMEshould behttpsfor production- The Reverb server needs to be started as a separate process (typically via Supervisor or as a Coolify service)