mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-02 22:46:16 +00:00
refactoring (#116)
- refactoring architecture - fix incomplete ssh logs - code editor for scripts in the app - remove Jobs and SSHCommands
This commit is contained in:
31
app/SSH/Wordpress/Wordpress.php
Normal file
31
app/SSH/Wordpress/Wordpress.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\SSH\Wordpress;
|
||||
|
||||
use App\Models\Site;
|
||||
use App\SSH\HasScripts;
|
||||
|
||||
class Wordpress
|
||||
{
|
||||
use HasScripts;
|
||||
|
||||
public function install(Site $site): void
|
||||
{
|
||||
$site->server->ssh()->exec(
|
||||
$this->getScript('install.sh', [
|
||||
'path' => $site->path,
|
||||
'domain' => $site->domain,
|
||||
'db_name' => $site->type_data['database'],
|
||||
'db_user' => $site->type_data['database_user'],
|
||||
'db_pass' => $site->type_data['database_password'],
|
||||
'db_host' => 'localhost',
|
||||
'db_prefix' => 'wp_',
|
||||
'username' => $site->type_data['username'],
|
||||
'password' => $site->type_data['password'],
|
||||
'email' => $site->type_data['email'],
|
||||
'title' => $site->type_data['title'],
|
||||
]),
|
||||
'install-wordpress'
|
||||
);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user