mirror of
https://github.com/PhyreApps/PhyrePanel.git
synced 2024-09-19 23:31:12 +00:00
update
This commit is contained in:
parent
382a38da60
commit
297fe6e6cd
56
web/Modules/Email/App/Console/SetupDockerEmailServer.php
Normal file
56
web/Modules/Email/App/Console/SetupDockerEmailServer.php
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Modules\Email\App\Console;
|
||||||
|
|
||||||
|
use Illuminate\Console\Command;
|
||||||
|
use Illuminate\Support\Facades\Blade;
|
||||||
|
use Symfony\Component\Console\Input\InputOption;
|
||||||
|
use Symfony\Component\Console\Input\InputArgument;
|
||||||
|
|
||||||
|
class SetupDockerEmailServer extends Command
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The name and signature of the console command.
|
||||||
|
*/
|
||||||
|
protected $signature = 'email:setup-docker-email-server';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The console command description.
|
||||||
|
*/
|
||||||
|
protected $description = 'Command description.';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new command instance.
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Execute the console command.
|
||||||
|
*/
|
||||||
|
public function handle()
|
||||||
|
{
|
||||||
|
|
||||||
|
$this->info('Setting up email server...');
|
||||||
|
|
||||||
|
$workPath = '/usr/local/phyre/email/docker';
|
||||||
|
|
||||||
|
$moduleServerConfigTemplatesPath = '/usr/local/phyre/web/Modules/Email/server/docker/';
|
||||||
|
$dockerComposeYaml = file_get_contents($moduleServerConfigTemplatesPath . 'docker-compose.yaml');
|
||||||
|
$dockerComposeYaml = Blade::render($dockerComposeYaml, [
|
||||||
|
'containerName' => 'phyre-mail-server',
|
||||||
|
'hostName'=> 'mail.server11.microweber.me',
|
||||||
|
'workPath' => $workPath,
|
||||||
|
]);
|
||||||
|
shell_exec('mkdir -p ' . $workPath);
|
||||||
|
file_put_contents($workPath . '/docker-compose.yaml', $dockerComposeYaml);
|
||||||
|
|
||||||
|
// dd(shell_exec('docker-compose -f ' . $workPath . '/docker-compose.yaml up -d'));
|
||||||
|
|
||||||
|
|
||||||
|
dd($dockerComposeYaml);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
17
web/Modules/Email/App/Filament/Pages/EmailSettings.php
Normal file
17
web/Modules/Email/App/Filament/Pages/EmailSettings.php
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Modules\Email\App\Filament\Pages;
|
||||||
|
|
||||||
|
use Filament\Pages\Page;
|
||||||
|
|
||||||
|
class EmailSettings extends Page
|
||||||
|
{
|
||||||
|
protected static ?string $navigationIcon = 'heroicon-o-cog';
|
||||||
|
|
||||||
|
protected static string $view = 'email::filament.pages.email-settings';
|
||||||
|
|
||||||
|
protected static ?string $navigationGroup = 'Email';
|
||||||
|
|
||||||
|
protected static ?string $navigationLabel = 'Settings';
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
<x-filament-panels::page>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
Email settings
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</x-filament-panels::page>
|
Loading…
Reference in a new issue