mirror of
https://github.com/vitodeploy/vito.git
synced 2025-04-20 18:31:36 +00:00
- refactoring architecture - fix incomplete ssh logs - code editor for scripts in the app - remove Jobs and SSHCommands
31 lines
629 B
PHP
Executable File
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();
|
|
}
|
|
}
|