Files
imail/app/Providers/HorizonServiceProvider.php
idevakk dae2bedca4
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled
feat: enterprise-grade Docker setup for Dokploy deployment
- 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
2026-03-09 22:55:05 +05:30

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, [
//
]);
});
}
}