initial commit

This commit is contained in:
TheOnlyMace
2026-05-17 13:26:14 +02:00
commit 75299b723d
176 changed files with 20327 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
<?php
namespace App\Console\Commands;
use App\Models\Customer;
use App\Services\Hosting\Traefik\TraefikGenerator;
use Illuminate\Console\Command;
class RebuildTraefikRoutesCommand extends Command
{
protected $signature = 'hosting:traefik-rebuild {--reload : Reload Traefik after rebuild}';
protected $description = 'Rebuild all customer Traefik routes from database';
public function handle(TraefikGenerator $traefik): int
{
$customers = Customer::query()
->where('status', 'active')
->whereNotNull('ip_address')
->get();
$traefik->rebuildAllRoutes($customers);
if ($this->option('reload')) {
$traefik->reload();
}
$this->info("Rebuilt routes for {$customers->count()} active customers.");
return self::SUCCESS;
}
}