vito/app/ServerTypes/Database.php
Saeed Vaziry 428140b931
refactoring (#116)
- refactoring architecture
- fix incomplete ssh logs
- code editor for scripts in the app
- remove Jobs and SSHCommands
2024-03-14 20:03:43 +01:00

31 lines
629 B
PHP
Executable File

<?php
namespace App\ServerTypes;
class Database extends AbstractType
{
public function createRules(array $input): array
{
return [
'database' => [
'required',
'in:'.implode(',', config('core.databases')),
],
];
}
public function data(array $input): array
{
return [];
}
public function createServices(array $input): void
{
$this->server->services()->forceDelete();
$this->addDatabase($input['database']);
$this->addSupervisor();
$this->addRedis();
$this->addUfw();
}
}