- Add multi-stage Dockerfile (node-builder, composer-builder, production) - Add Nginx config with WebSocket proxy at /_ws path - Add PHP-FPM pool config, php.ini with OPcache tuning - Add Supervisord managing 7 processes: php-fpm, nginx, horizon, scheduler, reverb, pulse-check, pulse-work - Add entrypoint.sh with auto-migration, config caching, storage setup - Add .dockerignore and .env.production.example - Install laravel/horizon for production queue management and dashboard - Install laravel/pulse for production monitoring with Reverb integration - Configure TrustProxies middleware for HTTPS behind Traefik - Add horizon:snapshot to scheduler - Add VITE_REVERB_PATH for WebSocket path routing through Nginx
37 lines
915 B
PHP
37 lines
915 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use Illuminate\Support\Facades\Gate;
|
|
use Laravel\Horizon\Horizon;
|
|
use Laravel\Horizon\HorizonApplicationServiceProvider;
|
|
|
|
class HorizonServiceProvider extends HorizonApplicationServiceProvider
|
|
{
|
|
/**
|
|
* Bootstrap any application services.
|
|
*/
|
|
public function boot(): void
|
|
{
|
|
parent::boot();
|
|
|
|
// Horizon::routeSmsNotificationsTo('15556667777');
|
|
// Horizon::routeMailNotificationsTo('example@example.com');
|
|
// Horizon::routeSlackNotificationsTo('slack-webhook-url', '#channel');
|
|
}
|
|
|
|
/**
|
|
* Register the Horizon gate.
|
|
*
|
|
* This gate determines who can access Horizon in non-local environments.
|
|
*/
|
|
protected function gate(): void
|
|
{
|
|
Gate::define('viewHorizon', function ($user = null) {
|
|
return in_array(optional($user)->email, [
|
|
//
|
|
]);
|
|
});
|
|
}
|
|
}
|