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>
150 lines
4.3 KiB
PHP
150 lines
4.3 KiB
PHP
<?php
|
|
|
|
namespace App\Services\Hosting\PanelRuntimes;
|
|
|
|
use App\Models\HostedDatabase;
|
|
use App\Models\HostedSite;
|
|
use App\Models\HostingAccount;
|
|
use App\Services\Hosting\Contracts\PanelRuntimeInterface;
|
|
use App\Services\Hosting\Providers\SharedNodeProvider;
|
|
|
|
class SharedHostingPanelRuntime implements PanelRuntimeInterface
|
|
{
|
|
private const CAPABILITIES = [
|
|
'files',
|
|
'databases',
|
|
'domains',
|
|
'terminal',
|
|
'php',
|
|
'ssl',
|
|
'cron',
|
|
'logs',
|
|
'apps',
|
|
'settings',
|
|
];
|
|
|
|
public function __construct(
|
|
private SharedNodeProvider $provider,
|
|
) {}
|
|
|
|
public function key(): string
|
|
{
|
|
return 'shared_hosting';
|
|
}
|
|
|
|
public function label(): string
|
|
{
|
|
return 'Ladill Hosting Panel';
|
|
}
|
|
|
|
public function capabilities(): array
|
|
{
|
|
return self::CAPABILITIES;
|
|
}
|
|
|
|
public function supports(string $capability): bool
|
|
{
|
|
return in_array($capability, self::CAPABILITIES, true);
|
|
}
|
|
|
|
public function executeCommand(HostingAccount $account, string $command, int $timeout = 600): array
|
|
{
|
|
return $this->provider->executeCommand($account, $command, $timeout);
|
|
}
|
|
|
|
public function executeTerminalCommand(HostingAccount $account, string $command, string $workingDirectory, int $timeout = 300): array
|
|
{
|
|
return $this->provider->executeTerminalCommand($account, $command, $workingDirectory, $timeout);
|
|
}
|
|
|
|
public function executeCommandAsRoot(HostingAccount $account, string $command): array
|
|
{
|
|
return $this->provider->executeCommandAsRoot($account, $command);
|
|
}
|
|
|
|
public function getUsageStats(HostingAccount $account): array
|
|
{
|
|
return $this->provider->getUsageStats($account);
|
|
}
|
|
|
|
public function changePassword(HostingAccount $account, string $newPassword): bool
|
|
{
|
|
return $this->provider->changePassword($account, $newPassword);
|
|
}
|
|
|
|
public function installTeamMemberSshKey(HostingAccount $account, string $marker, string $publicKey): void
|
|
{
|
|
$this->provider->installTeamMemberSshKey($account, $marker, $publicKey);
|
|
}
|
|
|
|
public function removeTeamMemberSshKey(HostingAccount $account, string $marker): void
|
|
{
|
|
$this->provider->removeTeamMemberSshKey($account, $marker);
|
|
}
|
|
|
|
public function createDatabase(HostedDatabase $database, string $password): array
|
|
{
|
|
return $this->provider->createDatabase($database, $password);
|
|
}
|
|
|
|
public function deleteDatabase(HostedDatabase $database): bool
|
|
{
|
|
return $this->provider->deleteDatabase($database);
|
|
}
|
|
|
|
public function changeDatabasePassword(HostedDatabase $database, string $newPassword): bool
|
|
{
|
|
return $this->provider->changeDatabasePassword($database, $newPassword);
|
|
}
|
|
|
|
public function addSite(HostedSite $site): array
|
|
{
|
|
return $this->provider->addSite($site);
|
|
}
|
|
|
|
public function removeSite(HostedSite $site): bool
|
|
{
|
|
return $this->provider->removeSite($site);
|
|
}
|
|
|
|
public function requestLetsEncryptCertificate(HostedSite $site): bool
|
|
{
|
|
return $this->provider->requestLetsEncryptCertificate($site);
|
|
}
|
|
|
|
public function ensurePhpFpmPool(HostingAccount $account): void
|
|
{
|
|
$this->provider->ensurePhpFpmPool($account);
|
|
}
|
|
|
|
public function setPhpVersion(HostedSite $site, string $version): bool
|
|
{
|
|
return $this->provider->setPhpVersion($site, $version);
|
|
}
|
|
|
|
public function changeAccountPhpVersion(HostingAccount $account, string $version): bool
|
|
{
|
|
return $this->provider->changeAccountPhpVersion($account, $version);
|
|
}
|
|
|
|
public function prepareDirectoryForUser(HostingAccount $account, string $path): void
|
|
{
|
|
$this->provider->prepareDirectoryForUser($account, $path);
|
|
}
|
|
|
|
public function setWebServerGroupOwnership(HostingAccount $account, string $path): void
|
|
{
|
|
$this->provider->setWebServerGroupOwnership($account, $path);
|
|
}
|
|
|
|
public function removeAppService(HostedSite $site): bool
|
|
{
|
|
return $this->provider->removeAppService($site);
|
|
}
|
|
|
|
public function restoreDefaultSiteConfig(HostingAccount $account, HostedSite $site, string $docRoot): void
|
|
{
|
|
$this->provider->restoreDefaultSiteConfig($account, $site, $docRoot);
|
|
}
|
|
}
|