mirror of
https://github.com/vitodeploy/vito.git
synced 2025-04-19 09:51:37 +00:00
- refactoring architecture - fix incomplete ssh logs - code editor for scripts in the app - remove Jobs and SSHCommands
41 lines
982 B
PHP
Executable File
41 lines
982 B
PHP
Executable File
<?php
|
|
|
|
namespace App\ServerTypes;
|
|
|
|
class Regular extends AbstractType
|
|
{
|
|
public function createRules(array $input): array
|
|
{
|
|
return [
|
|
'webserver' => [
|
|
'required',
|
|
'in:'.implode(',', config('core.webservers')),
|
|
],
|
|
'php' => [
|
|
'required',
|
|
'in:'.implode(',', config('core.php_versions')),
|
|
],
|
|
'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->addWebserver($input['webserver']);
|
|
$this->addDatabase($input['database']);
|
|
$this->addPHP($input['php']);
|
|
$this->addSupervisor();
|
|
$this->addRedis();
|
|
$this->addUfw();
|
|
}
|
|
}
|