- dev/betrieb/deploy.sh: Deploy nur per Tag, mit --seed (Seeder im Wartungsmodus) und --initial (Vorschau/Live einmalig an Ort und Stelle auf Git umstellen) - dev/betrieb/vorschau-auffrischen.sh: Live-DB und Live-Medien in die Vorschau (Generalprobe) - InteriorReleaseSeeder: alle Inhaltsschritte des Relaunchs in einem Lauf, idempotent; Displays, Playlists und Mediathek bleiben unberührt - DisplayInteriorBrandingSeeder überschreibt keinen inzwischen gepflegten Claim mehr - Monitoring: GlitchTip (Server + Browser), /health mit Token, Scheduler-Herzschlag, Alarme per Mail und ntfy, Version in about und /health - public/build versioniert; .gitignore: macOS-Muster Icon traf resources/views/flux/icon/ - Runbook: dev/betrieb/README.md Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
49 lines
1.5 KiB
PHP
49 lines
1.5 KiB
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use App\Support\OperationalAlert;
|
|
use Illuminate\Foundation\Console\AboutCommand;
|
|
use Illuminate\Queue\Events\JobFailed;
|
|
use Illuminate\Support\Facades\Queue;
|
|
use Illuminate\Support\Facades\URL;
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Register any application services.
|
|
*/
|
|
public function register(): void
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Bootstrap any application services.
|
|
*/
|
|
public function boot(): void
|
|
{
|
|
// Always force HTTPS when request comes via HTTPS
|
|
// Important for Livewire signed URLs (file uploads) behind Traefik proxy
|
|
$scheme = request()->header('X-Forwarded-Proto')
|
|
?? request()->server('HTTP_X_FORWARDED_PROTO')
|
|
?? (request()->secure() ? 'https' : 'http');
|
|
|
|
if ($scheme === 'https') {
|
|
URL::forceScheme('https');
|
|
}
|
|
|
|
// Betriebs-Alert bei endgültig fehlgeschlagenem Queue-Job
|
|
Queue::failing(function (JobFailed $event): void {
|
|
OperationalAlert::send("Queue-Job fehlgeschlagen: {$event->job->resolveName()}", [
|
|
'connection' => $event->connectionName,
|
|
'queue' => $event->job->getQueue(),
|
|
'exception' => $event->exception->getMessage(),
|
|
]);
|
|
});
|
|
|
|
// Ausgelieferte Version in `php artisan about` (ABOUT_SECTION in dev/betrieb/deploy.sh)
|
|
AboutCommand::add('B2in', fn (): array => ['Version' => config('app.version') ?? '—']);
|
|
}
|
|
}
|