Initial Ladill Hosting app with Gitea deploy pipeline.
Deploy Ladill Hosting / deploy (push) Failing after 17s

Shared web hosting extracted from the platform monolith, with CI deploy
to /var/www/ladill-hosting matching Bird/Domains/Email.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-06-06 16:24:20 +00:00
co-authored by Cursor
commit e251a4cf60
367 changed files with 66268 additions and 0 deletions
@@ -0,0 +1,41 @@
<?php
namespace App\Console\Commands;
use App\Models\HostingNode;
use App\Services\Hosting\NodeCapacityService;
use Illuminate\Console\Command;
class RecalculateHostingNodeCapacityCommand extends Command
{
protected $signature = 'hosting:recalculate-node-capacity {--node=} {--shared-only}';
protected $description = 'Recalculate logical capacity, allocated disk, and load for hosting nodes.';
public function handle(NodeCapacityService $capacityService): int
{
$nodes = HostingNode::query()
->when($this->option('node'), fn ($query, $nodeId) => $query->where('id', $nodeId))
->when($this->option('shared-only'), fn ($query) => $query->where('type', HostingNode::TYPE_SHARED))
->get();
foreach ($nodes as $node) {
$node = $capacityService->refreshNodeResourceTotals($node);
$capacityService->checkNode($node);
$this->line(sprintf(
'%s: accounts=%d allocated=%dGB used=%dGB logical=%.2fGB load=%.2f%%',
$node->name,
$node->current_accounts,
$node->allocated_disk_gb,
$node->used_disk_gb,
$node->logicalCapacityGb(),
(float) $node->current_load_percent
));
}
$this->info("Recalculated capacity for {$nodes->count()} node(s).");
return self::SUCCESS;
}
}