mirror of
https://github.com/PhyreApps/PhyrePanel.git
synced 2024-11-21 23:20:24 +00:00
Compare commits
29 commits
619a3877b7
...
6dac390f67
Author | SHA1 | Date | |
---|---|---|---|
|
6dac390f67 | ||
|
3bd7dc7c6c | ||
|
40868a74ce | ||
|
38ada71ca7 | ||
|
928fee3f0d | ||
|
af32e9efa9 | ||
|
aef89cc325 | ||
|
e82d70fb3a | ||
|
e72e6c220a | ||
|
5bc633d7b9 | ||
|
4a181c57c6 | ||
|
1ea5c22b4d | ||
|
61846f75a1 | ||
|
1cf0804f81 | ||
|
bc322f7084 | ||
|
bd53013d4b | ||
|
91bebbadc3 | ||
|
d6a6875a70 | ||
|
7345ae9df9 | ||
|
b865f1ef35 | ||
|
c164b93526 | ||
|
dfaeacd718 | ||
|
69a289dea7 | ||
|
69169bbba9 | ||
|
b6c35e379e | ||
|
02214d8565 | ||
|
8cb73da74c | ||
|
93558a2b74 | ||
|
0f89caca63 |
50 changed files with 817 additions and 314 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,2 +1,4 @@
|
|||
web/storage/installed
|
||||
/docker/e2e-tests/node_modules/
|
||||
web/config.php
|
||||
web/phyre-config.ini
|
||||
|
|
|
@ -45,17 +45,17 @@ MYSQL_SCRIPT
|
|||
echo "$MYSQL_ROOT_PASSWORD" > /root/.mysql_root_password
|
||||
|
||||
# Configure the application
|
||||
cp .env.example .env
|
||||
cp phyre-config.ini.example phyre-config.ini
|
||||
|
||||
sed -i "s/^APP_URL=.*/APP_URL=127.0.0.1:8443" .env
|
||||
sed -i "s/^APP_NAME=.*/APP_NAME=PHYRE_PANEL/" .env
|
||||
sed -i "s/^DB_DATABASE=.*/DB_DATABASE=$PHYRE_PANEL_DB_NAME/" .env
|
||||
sed -i "s/^DB_USERNAME=.*/DB_USERNAME=$PHYRE_PANEL_DB_USER/" .env
|
||||
sed -i "s/^DB_PASSWORD=.*/DB_PASSWORD=$PHYRE_PANEL_DB_PASSWORD/" .env
|
||||
sed -i "s/^DB_CONNECTION=.*/DB_CONNECTION=mysql/" .env
|
||||
sed -i "s/^APP_URL=.*/APP_URL=127.0.0.1:8443" phyre-config.ini
|
||||
sed -i "s/^APP_NAME=.*/APP_NAME=PHYRE_PANEL/" phyre-config.ini
|
||||
sed -i "s/^DB_DATABASE=.*/DB_DATABASE=$PHYRE_PANEL_DB_NAME/" phyre-config.ini
|
||||
sed -i "s/^DB_USERNAME=.*/DB_USERNAME=$PHYRE_PANEL_DB_USER/" phyre-config.ini
|
||||
sed -i "s/^DB_PASSWORD=.*/DB_PASSWORD=$PHYRE_PANEL_DB_PASSWORD/" phyre-config.ini
|
||||
sed -i "s/^DB_CONNECTION=.*/DB_CONNECTION=mysql/" phyre-config.ini
|
||||
|
||||
sed -i "s/^MYSQL_ROOT_USERNAME=.*/MYSQL_ROOT_USERNAME=$MYSQL_PHYRE_ROOT_USERNAME/" .env
|
||||
sed -i "s/^MYSQL_ROOT_PASSWORD=.*/MYSQL_ROOT_PASSWORD=$MYSQL_PHYRE_ROOT_PASSWORD/" .env
|
||||
sed -i "s/^MYSQL_ROOT_USERNAME=.*/MYSQL_ROOT_USERNAME=$MYSQL_PHYRE_ROOT_USERNAME/" phyre-config.ini
|
||||
sed -i "s/^MYSQL_ROOT_PASSWORD=.*/MYSQL_ROOT_PASSWORD=$MYSQL_PHYRE_ROOT_PASSWORD/" phyre-config.ini
|
||||
|
||||
phyre-php artisan key:generate
|
||||
phyre-php artisan migrate
|
||||
|
|
|
@ -48,17 +48,17 @@ MYSQL_SCRIPT
|
|||
echo "$MYSQL_ROOT_PASSWORD" > /root/.mysql_root_password
|
||||
|
||||
# Configure the application
|
||||
cp .env.example .env
|
||||
cp phyre-config.ini.example phyre-config.ini
|
||||
|
||||
sed -i "s/^APP_URL=.*/APP_URL=127.0.0.1:8443" .env
|
||||
sed -i "s/^APP_NAME=.*/APP_NAME=PHYRE_PANEL/" .env
|
||||
sed -i "s/^DB_DATABASE=.*/DB_DATABASE=$PHYRE_PANEL_DB_NAME/" .env
|
||||
sed -i "s/^DB_USERNAME=.*/DB_USERNAME=$PHYRE_PANEL_DB_USER/" .env
|
||||
sed -i "s/^DB_PASSWORD=.*/DB_PASSWORD=$PHYRE_PANEL_DB_PASSWORD/" .env
|
||||
sed -i "s/^DB_CONNECTION=.*/DB_CONNECTION=mysql/" .env
|
||||
sed -i "s/^APP_URL=.*/APP_URL=127.0.0.1:8443" phyre-config.ini
|
||||
sed -i "s/^APP_NAME=.*/APP_NAME=PHYRE_PANEL/" phyre-config.ini
|
||||
sed -i "s/^DB_DATABASE=.*/DB_DATABASE=$PHYRE_PANEL_DB_NAME/" phyre-config.ini
|
||||
sed -i "s/^DB_USERNAME=.*/DB_USERNAME=$PHYRE_PANEL_DB_USER/" phyre-config.ini
|
||||
sed -i "s/^DB_PASSWORD=.*/DB_PASSWORD=$PHYRE_PANEL_DB_PASSWORD/" phyre-config.ini
|
||||
sed -i "s/^DB_CONNECTION=.*/DB_CONNECTION=mysql/" phyre-config.ini
|
||||
|
||||
sed -i "s/^MYSQL_ROOT_USERNAME=.*/MYSQL_ROOT_USERNAME=$MYSQL_PHYRE_ROOT_USERNAME/" .env
|
||||
sed -i "s/^MYSQL_ROOT_PASSWORD=.*/MYSQL_ROOT_PASSWORD=$MYSQL_PHYRE_ROOT_PASSWORD/" .env
|
||||
sed -i "s/^MYSQL_ROOT_USERNAME=.*/MYSQL_ROOT_USERNAME=$MYSQL_PHYRE_ROOT_USERNAME/" phyre-config.ini
|
||||
sed -i "s/^MYSQL_ROOT_PASSWORD=.*/MYSQL_ROOT_PASSWORD=$MYSQL_PHYRE_ROOT_PASSWORD/" phyre-config.ini
|
||||
|
||||
phyre-php artisan key:generate
|
||||
phyre-php artisan migrate
|
||||
|
|
|
@ -129,17 +129,17 @@ MYSQL_SCRIPT
|
|||
echo "$MYSQL_ROOT_PASSWORD" > /root/.mysql_root_password
|
||||
|
||||
# Configure the application
|
||||
cp .env.example .env
|
||||
cp phyre-config.ini.example phyre-config.ini
|
||||
|
||||
sed -i "s/^APP_URL=.*/APP_URL=127.0.0.1:8443" .env
|
||||
sed -i "s/^APP_NAME=.*/APP_NAME=PHYRE_PANEL/" .env
|
||||
sed -i "s/^DB_DATABASE=.*/DB_DATABASE=$PHYRE_PANEL_DB_NAME/" .env
|
||||
sed -i "s/^DB_USERNAME=.*/DB_USERNAME=$PHYRE_PANEL_DB_USER/" .env
|
||||
sed -i "s/^DB_PASSWORD=.*/DB_PASSWORD=$PHYRE_PANEL_DB_PASSWORD/" .env
|
||||
sed -i "s/^DB_CONNECTION=.*/DB_CONNECTION=mysql/" .env
|
||||
sed -i "s/^APP_URL=.*/APP_URL=127.0.0.1:8443" phyre-config.ini
|
||||
sed -i "s/^APP_NAME=.*/APP_NAME=PHYRE_PANEL/" phyre-config.ini
|
||||
sed -i "s/^DB_DATABASE=.*/DB_DATABASE=$PHYRE_PANEL_DB_NAME/" phyre-config.ini
|
||||
sed -i "s/^DB_USERNAME=.*/DB_USERNAME=$PHYRE_PANEL_DB_USER/" phyre-config.ini
|
||||
sed -i "s/^DB_PASSWORD=.*/DB_PASSWORD=$PHYRE_PANEL_DB_PASSWORD/" phyre-config.ini
|
||||
sed -i "s/^DB_CONNECTION=.*/DB_CONNECTION=mysql/" phyre-config.ini
|
||||
|
||||
sed -i "s/^MYSQL_ROOT_USERNAME=.*/MYSQL_ROOT_USERNAME=$MYSQL_PHYRE_ROOT_USERNAME/" .env
|
||||
sed -i "s/^MYSQL_ROOT_PASSWORD=.*/MYSQL_ROOT_PASSWORD=$MYSQL_PHYRE_ROOT_PASSWORD/" .env
|
||||
sed -i "s/^MYSQL_ROOT_USERNAME=.*/MYSQL_ROOT_USERNAME=$MYSQL_PHYRE_ROOT_USERNAME/" phyre-config.ini
|
||||
sed -i "s/^MYSQL_ROOT_PASSWORD=.*/MYSQL_ROOT_PASSWORD=$MYSQL_PHYRE_ROOT_PASSWORD/" phyre-config.ini
|
||||
|
||||
phyre-php artisan key:generate
|
||||
phyre-php artisan migrate
|
||||
|
|
|
@ -48,17 +48,17 @@ MYSQL_SCRIPT
|
|||
echo "$MYSQL_ROOT_PASSWORD" > /root/.mysql_root_password
|
||||
|
||||
# Configure the application
|
||||
cp .env.example .env
|
||||
cp phyre-config.ini.example phyre-config.ini
|
||||
|
||||
sed -i "s/^APP_URL=.*/APP_URL=127.0.0.1:8443" .env
|
||||
sed -i "s/^APP_NAME=.*/APP_NAME=PHYRE_PANEL/" .env
|
||||
sed -i "s/^DB_DATABASE=.*/DB_DATABASE=$PHYRE_PANEL_DB_NAME/" .env
|
||||
sed -i "s/^DB_USERNAME=.*/DB_USERNAME=$PHYRE_PANEL_DB_USER/" .env
|
||||
sed -i "s/^DB_PASSWORD=.*/DB_PASSWORD=$PHYRE_PANEL_DB_PASSWORD/" .env
|
||||
sed -i "s/^DB_CONNECTION=.*/DB_CONNECTION=mysql/" .env
|
||||
sed -i "s/^APP_URL=.*/APP_URL=127.0.0.1:8443" phyre-config.ini
|
||||
sed -i "s/^APP_NAME=.*/APP_NAME=PHYRE_PANEL/" phyre-config.ini
|
||||
sed -i "s/^DB_DATABASE=.*/DB_DATABASE=$PHYRE_PANEL_DB_NAME/" phyre-config.ini
|
||||
sed -i "s/^DB_USERNAME=.*/DB_USERNAME=$PHYRE_PANEL_DB_USER/" phyre-config.ini
|
||||
sed -i "s/^DB_PASSWORD=.*/DB_PASSWORD=$PHYRE_PANEL_DB_PASSWORD/" phyre-config.ini
|
||||
sed -i "s/^DB_CONNECTION=.*/DB_CONNECTION=mysql/" phyre-config.ini
|
||||
|
||||
sed -i "s/^MYSQL_ROOT_USERNAME=.*/MYSQL_ROOT_USERNAME=$MYSQL_PHYRE_ROOT_USERNAME/" .env
|
||||
sed -i "s/^MYSQL_ROOT_PASSWORD=.*/MYSQL_ROOT_PASSWORD=$MYSQL_PHYRE_ROOT_PASSWORD/" .env
|
||||
sed -i "s/^MYSQL_ROOT_USERNAME=.*/MYSQL_ROOT_USERNAME=$MYSQL_PHYRE_ROOT_USERNAME/" phyre-config.ini
|
||||
sed -i "s/^MYSQL_ROOT_PASSWORD=.*/MYSQL_ROOT_PASSWORD=$MYSQL_PHYRE_ROOT_PASSWORD/" phyre-config.ini
|
||||
|
||||
phyre-php artisan key:generate
|
||||
phyre-php artisan migrate
|
||||
|
|
|
@ -131,17 +131,17 @@ MYSQL_SCRIPT
|
|||
echo "$MYSQL_ROOT_PASSWORD" > /root/.mysql_root_password
|
||||
|
||||
# Configure the application
|
||||
cp .env.example .env
|
||||
cp phyre-config.ini.example phyre-config.ini
|
||||
|
||||
sed -i "s/^APP_URL=.*/APP_URL=127.0.0.1:8443" .env
|
||||
sed -i "s/^APP_NAME=.*/APP_NAME=PHYRE_PANEL/" .env
|
||||
sed -i "s/^DB_DATABASE=.*/DB_DATABASE=$PHYRE_PANEL_DB_NAME/" .env
|
||||
sed -i "s/^DB_USERNAME=.*/DB_USERNAME=$PHYRE_PANEL_DB_USER/" .env
|
||||
sed -i "s/^DB_PASSWORD=.*/DB_PASSWORD=$PHYRE_PANEL_DB_PASSWORD/" .env
|
||||
sed -i "s/^DB_CONNECTION=.*/DB_CONNECTION=mysql/" .env
|
||||
sed -i "s/^APP_URL=.*/APP_URL=127.0.0.1:8443" phyre-config.ini
|
||||
sed -i "s/^APP_NAME=.*/APP_NAME=PHYRE_PANEL/" phyre-config.ini
|
||||
sed -i "s/^DB_DATABASE=.*/DB_DATABASE=$PHYRE_PANEL_DB_NAME/" phyre-config.ini
|
||||
sed -i "s/^DB_USERNAME=.*/DB_USERNAME=$PHYRE_PANEL_DB_USER/" phyre-config.ini
|
||||
sed -i "s/^DB_PASSWORD=.*/DB_PASSWORD=$PHYRE_PANEL_DB_PASSWORD/" phyre-config.ini
|
||||
sed -i "s/^DB_CONNECTION=.*/DB_CONNECTION=mysql/" phyre-config.ini
|
||||
|
||||
sed -i "s/^MYSQL_ROOT_USERNAME=.*/MYSQL_ROOT_USERNAME=$MYSQL_PHYRE_ROOT_USERNAME/" .env
|
||||
sed -i "s/^MYSQL_ROOT_PASSWORD=.*/MYSQL_ROOT_PASSWORD=$MYSQL_PHYRE_ROOT_PASSWORD/" .env
|
||||
sed -i "s/^MYSQL_ROOT_USERNAME=.*/MYSQL_ROOT_USERNAME=$MYSQL_PHYRE_ROOT_USERNAME/" phyre-config.ini
|
||||
sed -i "s/^MYSQL_ROOT_PASSWORD=.*/MYSQL_ROOT_PASSWORD=$MYSQL_PHYRE_ROOT_PASSWORD/" phyre-config.ini
|
||||
|
||||
phyre-php artisan key:generate
|
||||
phyre-php artisan migrate
|
||||
|
|
|
@ -73,9 +73,6 @@ class DockerContainerResource extends Resource
|
|||
$defaultPort = $port;
|
||||
}
|
||||
}
|
||||
if ($defaultPort == 80) {
|
||||
$defaultPort = 83;
|
||||
}
|
||||
|
||||
$dockerTemplateContent = '';
|
||||
$dockerTemplateId = request()->get('docker_template_id', null);
|
||||
|
|
|
@ -4,12 +4,15 @@ namespace Modules\Microweber\Filament\Clusters\Microweber\Pages;
|
|||
|
||||
use App\ShellApi;
|
||||
use Filament\Pages\Page;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use MicroweberPackages\ComposerClient\Client;
|
||||
use MicroweberPackages\SharedServerScripts\MicroweberAppPathHelper;
|
||||
use MicroweberPackages\SharedServerScripts\MicroweberDownloader;
|
||||
use MicroweberPackages\SharedServerScripts\MicroweberModuleConnectorsDownloader;
|
||||
use MicroweberPackages\SharedServerScripts\MicroweberTemplatesDownloader;
|
||||
use Modules\Microweber\Filament\Clusters\MicroweberCluster;
|
||||
use Modules\Microweber\Jobs\DownloadMicroweber;
|
||||
use Modules\Microweber\MicroweberComposerClientHelper;
|
||||
|
||||
class Version extends Page
|
||||
{
|
||||
|
@ -33,19 +36,26 @@ class Version extends Page
|
|||
|
||||
public $supportedLanguages = [];
|
||||
|
||||
public $downloadingNow = false;
|
||||
|
||||
protected function getViewData(): array
|
||||
{
|
||||
$release = $this->__getMicroweberDownloaderInstance()->getRelease();
|
||||
$mwComposerClientHelper = new MicroweberComposerClientHelper();
|
||||
|
||||
$sharedPath = new MicroweberAppPathHelper();
|
||||
$sharedPath->setPath(config('microweber.sharedPaths.app'));
|
||||
|
||||
$this->supportedLanguages = $sharedPath->getSupportedLanguages();
|
||||
$this->supportedTemplates = $sharedPath->getSupportedTemplates();
|
||||
$this->latestVersionOfApp = $this->__getMicroweberDownloaderInstance()->getVersion();
|
||||
$this->latestVersionOfApp = $mwComposerClientHelper->getMicroweberDownloaderInstance()->getVersion();
|
||||
$this->currentVersionOfApp = $sharedPath->getCurrentVersion();
|
||||
$this->latestDownloadDateOfApp = $sharedPath->getCreatedAt();
|
||||
|
||||
$findJob = DB::table('jobs')->where('payload', 'like', '%DownloadMicroweber%')->get();
|
||||
if ($findJob->count() > 0) {
|
||||
$this->downloadingNow = true;
|
||||
}
|
||||
|
||||
return [
|
||||
'appVersion' => $this->currentVersionOfApp,
|
||||
'latestAppVersion' => $this->latestVersionOfApp,
|
||||
|
@ -60,65 +70,7 @@ class Version extends Page
|
|||
|
||||
public function checkForUpdates()
|
||||
{
|
||||
$sharedAppPath = config('microweber.sharedPaths.app');
|
||||
DownloadMicroweber::dispatch();
|
||||
|
||||
if (! is_dir(dirname($sharedAppPath))) {
|
||||
mkdir(dirname($sharedAppPath));
|
||||
}
|
||||
|
||||
$shellPath = '/usr/local/phyre/web/vendor/microweber-packages/shared-server-scripts/shell-scripts';
|
||||
ShellApi::exec('chmod +x '.$shellPath.'/*');
|
||||
|
||||
// Download core app
|
||||
$status = $this->__getMicroweberDownloaderInstance()
|
||||
->download(config('microweber.sharedPaths.app'));
|
||||
|
||||
// Download modules
|
||||
$modulesDownloader = new MicroweberModuleConnectorsDownloader();
|
||||
$modulesDownloader->setComposerClient($this->__getComposerClientInstance());
|
||||
$status = $modulesDownloader->download(config('microweber.sharedPaths.modules'));
|
||||
|
||||
// Download templates
|
||||
$templatesDownloader = new MicroweberTemplatesDownloader();
|
||||
$templatesDownloader->setComposerClient($this->__getComposerLicensedInstance());
|
||||
$status = $templatesDownloader->download(config('microweber.sharedPaths.templates'));
|
||||
|
||||
}
|
||||
|
||||
private function __getComposerClientInstance()
|
||||
{
|
||||
// The module connector must have own instance of composer client
|
||||
$composerClient = new Client();
|
||||
$composerClient->packageServers = [
|
||||
'https://market.microweberapi.com/packages/microweberserverpackages/packages.json',
|
||||
];
|
||||
|
||||
return $composerClient;
|
||||
}
|
||||
|
||||
private function __getComposerLicensedInstance()
|
||||
{
|
||||
$composerClientLicensed = new Client();
|
||||
$composerClientLicensed->addLicense([
|
||||
'local_key' => setting('whitelabel_license_key')
|
||||
]);
|
||||
|
||||
return $composerClientLicensed;
|
||||
}
|
||||
|
||||
private function __getMicroweberDownloaderInstance()
|
||||
{
|
||||
$coreDownloader = new MicroweberDownloader();
|
||||
|
||||
$updateAppChannel = 'stable';
|
||||
if ($updateAppChannel == 'stable') {
|
||||
$coreDownloader->setReleaseSource(MicroweberDownloader::STABLE_RELEASE);
|
||||
} else {
|
||||
$coreDownloader->setReleaseSource(MicroweberDownloader::DEV_RELEASE);
|
||||
}
|
||||
|
||||
$coreDownloader->setComposerClient($this->__getComposerClientInstance());
|
||||
|
||||
return $coreDownloader;
|
||||
}
|
||||
}
|
||||
|
|
54
web/Modules/Microweber/Jobs/DownloadMicroweber.php
Normal file
54
web/Modules/Microweber/Jobs/DownloadMicroweber.php
Normal file
|
@ -0,0 +1,54 @@
|
|||
<?php
|
||||
|
||||
namespace Modules\Microweber\Jobs;
|
||||
|
||||
use App\ShellApi;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Foundation\Bus\Dispatchable;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use MicroweberPackages\ComposerClient\Client;
|
||||
use MicroweberPackages\SharedServerScripts\MicroweberDownloader;
|
||||
use MicroweberPackages\SharedServerScripts\MicroweberModuleConnectorsDownloader;
|
||||
use MicroweberPackages\SharedServerScripts\MicroweberTemplatesDownloader;
|
||||
use Modules\Microweber\MicroweberComposerClientHelper;
|
||||
|
||||
class DownloadMicroweber implements ShouldQueue
|
||||
{
|
||||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||
|
||||
public static $displayName = 'Download Microweber';
|
||||
public static $displayDescription = 'Download Microweber core, modules and templates';
|
||||
|
||||
public function handle(): void
|
||||
{
|
||||
set_time_limit(0);
|
||||
|
||||
$sharedAppPath = config('microweber.sharedPaths.app');
|
||||
|
||||
if (!is_dir(dirname($sharedAppPath))) {
|
||||
mkdir(dirname($sharedAppPath));
|
||||
}
|
||||
|
||||
$shellPath = '/usr/local/phyre/web/vendor/microweber-packages/shared-server-scripts/shell-scripts';
|
||||
ShellApi::exec('chmod +x ' . $shellPath . '/*');
|
||||
|
||||
$mwComposerClientHelper = new MicroweberComposerClientHelper();
|
||||
|
||||
// Download core app
|
||||
$status = $mwComposerClientHelper->getMicroweberDownloaderInstance()->download(config('microweber.sharedPaths.app'));
|
||||
|
||||
// Download modules
|
||||
$modulesDownloader = new MicroweberModuleConnectorsDownloader();
|
||||
$modulesDownloader->setComposerClient($mwComposerClientHelper->getComposerClientInstance());
|
||||
$status = $modulesDownloader->download(config('microweber.sharedPaths.modules'));
|
||||
|
||||
// Download templates
|
||||
$templatesDownloader = new MicroweberTemplatesDownloader();
|
||||
$templatesDownloader->setComposerClient($mwComposerClientHelper->getComposerLicensedInstance());
|
||||
$status = $templatesDownloader->download(config('microweber.sharedPaths.templates'));
|
||||
|
||||
}
|
||||
|
||||
}
|
46
web/Modules/Microweber/MicroweberComposerClientHelper.php
Normal file
46
web/Modules/Microweber/MicroweberComposerClientHelper.php
Normal file
|
@ -0,0 +1,46 @@
|
|||
<?php
|
||||
|
||||
namespace Modules\Microweber;
|
||||
|
||||
use MicroweberPackages\ComposerClient\Client;
|
||||
use MicroweberPackages\SharedServerScripts\MicroweberDownloader;
|
||||
|
||||
class MicroweberComposerClientHelper
|
||||
{
|
||||
public function getComposerClientInstance()
|
||||
{
|
||||
// The module connector must have own instance of composer client
|
||||
$composerClient = new Client();
|
||||
$composerClient->packageServers = [
|
||||
'https://market.microweberapi.com/packages/microweberserverpackages/packages.json',
|
||||
];
|
||||
|
||||
return $composerClient;
|
||||
}
|
||||
|
||||
public function getComposerLicensedInstance()
|
||||
{
|
||||
$composerClientLicensed = new Client();
|
||||
$composerClientLicensed->addLicense([
|
||||
'local_key' => setting('whitelabel_license_key')
|
||||
]);
|
||||
|
||||
return $composerClientLicensed;
|
||||
}
|
||||
|
||||
public function getMicroweberDownloaderInstance()
|
||||
{
|
||||
$coreDownloader = new MicroweberDownloader();
|
||||
|
||||
if (setting('microweber.update_app_channel') == 'development') {
|
||||
$coreDownloader->setReleaseSource(MicroweberDownloader::DEV_RELEASE);
|
||||
} else {
|
||||
$coreDownloader->setReleaseSource(MicroweberDownloader::STABLE_RELEASE);
|
||||
}
|
||||
|
||||
$coreDownloader->setComposerClient($this->getComposerClientInstance());
|
||||
|
||||
return $coreDownloader;
|
||||
}
|
||||
|
||||
}
|
23
web/Modules/Microweber/MicroweberShellExecutor.php
Normal file
23
web/Modules/Microweber/MicroweberShellExecutor.php
Normal file
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
|
||||
namespace Modules\Microweber;
|
||||
|
||||
use MicroweberPackages\SharedServerScripts\Shell\Adapters\NativeShellExecutor;
|
||||
use Symfony\Component\Process\Process;
|
||||
|
||||
class MicroweberShellExecutor extends NativeShellExecutor
|
||||
{
|
||||
public function executeCommand(array $args, $cwd = null, $env = null)
|
||||
{
|
||||
// Escape shell arguments
|
||||
$args = array_map('escapeshellarg', $args);
|
||||
$command = implode(' ', $args);
|
||||
|
||||
if (!empty($cwd)) {
|
||||
$command = 'cd ' . escapeshellarg($cwd) . ' && ' . $command;
|
||||
}
|
||||
|
||||
return shell_exec($command);
|
||||
}
|
||||
|
||||
}
|
|
@ -35,8 +35,20 @@
|
|||
Your app and templates is up-to-date!
|
||||
</div>--}}
|
||||
|
||||
@if($downloadingNow)
|
||||
<div class="flex gap-2 items-center p-4 text-white rounded bg-green-500/90 dark:bg-green-500/30">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24">
|
||||
<path fill="none" stroke="currentColor" stroke-dasharray="15" stroke-dashoffset="15" stroke-linecap="round" stroke-width="2" d="M12 3C16.9706 3 21 7.02944 21 12">
|
||||
<animate fill="freeze" attributeName="stroke-dashoffset" dur="0.3s" values="15;0" />
|
||||
<animateTransform attributeName="transform" dur="1.5s" repeatCount="indefinite" type="rotate" values="0 12 12;360 12 12" />
|
||||
</path>
|
||||
</svg>
|
||||
Downloading new app version...
|
||||
</div>
|
||||
@else
|
||||
<x-filament::button wire:click="checkForUpdates" class="w-[16rem]">
|
||||
Check for updates
|
||||
</x-filament::button>
|
||||
@endif
|
||||
|
||||
</x-filament-panels::page>
|
||||
|
|
|
@ -32,7 +32,13 @@ class RunRepair extends Command
|
|||
{
|
||||
|
||||
// Overwrite supervisor config file
|
||||
file_put_contents('/etc/supervisor/conf.d/phyre.conf', file_get_contents(base_path('app/Supervisor/configs/phyre-worker.conf')));
|
||||
$workersCount = (int) setting('general.supervisor_workers_count');
|
||||
$supervisorConf = view('actions.samples.ubuntu.supervisor-conf', [
|
||||
'workersCount' => $workersCount
|
||||
])->render();
|
||||
|
||||
// Overwrite supervisor config file
|
||||
file_put_contents('/etc/supervisor/conf.d/phyre.conf', $supervisorConf);
|
||||
|
||||
// Restart supervisor
|
||||
shell_exec('service supervisor restart');
|
||||
|
|
35
web/app/Console/Commands/SetIniSettings.php
Normal file
35
web/app/Console/Commands/SetIniSettings.php
Normal file
|
@ -0,0 +1,35 @@
|
|||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use Dotenv\Dotenv;
|
||||
use Illuminate\Console\Command;
|
||||
use Jelix\IniFile\IniModifier;
|
||||
|
||||
class SetIniSettings extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'phyre:set-ini-settings';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Command description';
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
// $ini = new IniModifier('phyre-config.ini');
|
||||
// $ini->setValue($key, $value, 'phyre');
|
||||
// $ini->save();
|
||||
|
||||
}
|
||||
}
|
|
@ -27,6 +27,20 @@ class Settings extends BaseSettings
|
|||
{
|
||||
parent::save();
|
||||
|
||||
|
||||
// Overwrite supervisor config file
|
||||
$workersCount = (int) setting('general.supervisor_workers_count');
|
||||
$supervisorConf = view('actions.samples.ubuntu.supervisor-conf', [
|
||||
'workersCount' => $workersCount
|
||||
])->render();
|
||||
|
||||
// Overwrite supervisor config file
|
||||
file_put_contents('/etc/supervisor/conf.d/phyre.conf', $supervisorConf);
|
||||
|
||||
// Restart supervisor
|
||||
shell_exec('service supervisor restart');
|
||||
|
||||
|
||||
// Make master domain virtual host
|
||||
$masterDomain = new MasterDomain();
|
||||
$masterDomain->configureVirtualHost();
|
||||
|
@ -68,6 +82,14 @@ class Settings extends BaseSettings
|
|||
TextInput::make('general.backup_path')
|
||||
->default(Storage::path('backups'))
|
||||
]),
|
||||
|
||||
Tabs\Tab::make('Supervisor')
|
||||
->schema([
|
||||
TextInput::make('general.supervisor_workers_count')
|
||||
->numeric()
|
||||
->helperText('Number of workers to run supervisor processes. Default is 4.')
|
||||
->default(4)
|
||||
]),
|
||||
]),
|
||||
];
|
||||
}
|
||||
|
|
|
@ -3,10 +3,14 @@
|
|||
namespace App\Filament\Resources\BackupResource\Pages;
|
||||
|
||||
use App\Filament\Resources\BackupResource;
|
||||
use App\Jobs\RestoreBackup;
|
||||
use Filament\Actions;
|
||||
use Filament\Forms\Components\FileUpload;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Pages\Concerns\ExposesTableToWidgets;
|
||||
use Filament\Resources\Components\Tab;
|
||||
use Filament\Resources\Pages\ManageRecords;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class ManageBackups extends ManageRecords
|
||||
{
|
||||
|
@ -16,9 +20,37 @@ class ManageBackups extends ManageRecords
|
|||
|
||||
protected function getActions(): array
|
||||
{
|
||||
$restoringBackup = false;
|
||||
$checkJob = DB::table('jobs')->where('payload', 'like', '%RestoreBackup%')->first();
|
||||
if ($checkJob) {
|
||||
$restoringBackup = true;
|
||||
}
|
||||
|
||||
return [
|
||||
|
||||
Actions\Action::make('restore')
|
||||
->hidden($restoringBackup)
|
||||
->icon('heroicon-o-cloud-arrow-up')
|
||||
->slideOver()
|
||||
->modalHeading('Restore data from backup file')
|
||||
->form(function () {
|
||||
return [
|
||||
FileUpload::make('backupFile')
|
||||
->placeholder('Upload your backup file to restore data')
|
||||
->helperText('Supported file types: .zip')
|
||||
->disk('local')
|
||||
->directory('backup-restores')
|
||||
->visibility('private')
|
||||
->acceptedFileTypes(['application/zip'])
|
||||
];
|
||||
})->afterFormValidated(function (array $data) {
|
||||
|
||||
RestoreBackup::dispatch($data['backupFile']);
|
||||
|
||||
}),
|
||||
|
||||
Actions\CreateAction::make()
|
||||
->size('sm')
|
||||
->icon('heroicon-o-clock')
|
||||
->slideOver(),
|
||||
];
|
||||
}
|
||||
|
|
|
@ -28,12 +28,6 @@ class BackupStats extends BaseWidget
|
|||
{
|
||||
|
||||
$stats = Cache::remember('backup-stats', 300, function () {
|
||||
$findBackups = Backup::select(['id'])->where('status', 'processing')->get();
|
||||
if ($findBackups->count() > 0) {
|
||||
foreach ($findBackups as $backup) {
|
||||
$backup->checkBackup();
|
||||
}
|
||||
}
|
||||
$usedSpace = 0;
|
||||
$backupPath = BackupStorage::getPath();
|
||||
if (is_dir($backupPath)) {
|
||||
|
|
|
@ -17,6 +17,9 @@ class ProcessHostingSubscriptionBackup implements ShouldQueue
|
|||
|
||||
protected $id;
|
||||
|
||||
public static $displayName = 'Hosting Subscription Backup';
|
||||
public static $displayDescription = 'Backup hosting subscription files and database...';
|
||||
|
||||
/**
|
||||
* Create a new job instance.
|
||||
*/
|
||||
|
|
47
web/app/Jobs/RestoreBackup.php
Normal file
47
web/app/Jobs/RestoreBackup.php
Normal file
|
@ -0,0 +1,47 @@
|
|||
<?php
|
||||
|
||||
namespace App\Jobs;
|
||||
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Foundation\Bus\Dispatchable;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
class RestoreBackup implements ShouldQueue
|
||||
{
|
||||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||
|
||||
public $backupFile = null;
|
||||
|
||||
public static $displayName = 'Restore Backup';
|
||||
public static $displayDescription = 'Restore backup file...';
|
||||
|
||||
/**
|
||||
* Create a new job instance.
|
||||
*/
|
||||
public function __construct($backupFile)
|
||||
{
|
||||
$this->backupFile = $backupFile;
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the job.
|
||||
*/
|
||||
public function handle(): void
|
||||
{
|
||||
|
||||
echo "Restoring backup file: " . $this->backupFile . "\n";
|
||||
|
||||
$file = Storage::disk('local')->get($this->backupFile);
|
||||
if (!$file) {
|
||||
echo "Backup file not found\n";
|
||||
return;
|
||||
}
|
||||
|
||||
sleep(14);
|
||||
|
||||
|
||||
}
|
||||
}
|
|
@ -10,13 +10,15 @@ class BackupLog extends Component
|
|||
|
||||
public $backupLog;
|
||||
|
||||
public $backupLogFile = '';
|
||||
|
||||
public function pullBackupLog()
|
||||
{
|
||||
$findBackup = \App\Models\Backup::where('id', $this->backupId)->first();
|
||||
if ($findBackup) {
|
||||
$backupLog = $findBackup->path . '/backup.log';
|
||||
if (file_exists($backupLog)) {
|
||||
$backupLogContent = file_get_contents($backupLog);
|
||||
|
||||
if ($this->backupLogFile) {
|
||||
if (file_exists($this->backupLogFile)) {
|
||||
|
||||
$backupLogContent = shell_exec('tail -n 1000 ' . $this->backupLogFile);
|
||||
// Get last 1000 lines of the log
|
||||
$backupLogContent = substr($backupLogContent, -5000, 5000);
|
||||
$backupLogContent = str_replace("\n", "<br>", $backupLogContent);
|
||||
|
@ -24,10 +26,17 @@ class BackupLog extends Component
|
|||
$this->backupLog = $backupLogContent;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
public function mount($backupId)
|
||||
{
|
||||
$this->backupId = $backupId;
|
||||
|
||||
$findBackup = \App\Models\Backup::where('id', $this->backupId)->first();
|
||||
if ($findBackup) {
|
||||
$this->backupLogFile = $findBackup->path . '/backup.log';
|
||||
$this->pullBackupLog();
|
||||
}
|
||||
}
|
||||
|
||||
public function render()
|
||||
|
|
|
@ -10,13 +10,14 @@ class HostingSubscriptionBackupLog extends Component
|
|||
|
||||
public $backupLog;
|
||||
|
||||
public $backupLogFile = '';
|
||||
|
||||
public function pullBackupLog()
|
||||
{
|
||||
$findHsb = \App\Models\HostingSubscriptionBackup::where('id', $this->hostingSubscriptionBackupId)->first();
|
||||
if ($findHsb) {
|
||||
$backupLog = $findHsb->path . '/backup.log';
|
||||
if (file_exists($backupLog)) {
|
||||
$backupLogContent = file_get_contents($backupLog);
|
||||
if ($this->backupLogFile) {
|
||||
if (file_exists($this->backupLogFile)) {
|
||||
|
||||
$backupLogContent = shell_exec('tail -n 1000 ' . $this->backupLogFile);
|
||||
// Get last 1000 lines of the log
|
||||
$backupLogContent = substr($backupLogContent, -5000, 5000);
|
||||
$backupLogContent = str_replace("\n", "<br>", $backupLogContent);
|
||||
|
@ -25,9 +26,16 @@ class HostingSubscriptionBackupLog extends Component
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function mount($hostingSubscriptionBackupId)
|
||||
{
|
||||
$this->hostingSubscriptionBackupId = $hostingSubscriptionBackupId;
|
||||
|
||||
$findHsb = \App\Models\HostingSubscriptionBackup::where('id', $this->hostingSubscriptionBackupId)->first();
|
||||
if ($findHsb) {
|
||||
$this->backupLogFile = $findHsb->path . '/backup.log';
|
||||
$this->pullBackupLog();
|
||||
}
|
||||
}
|
||||
|
||||
public function render()
|
||||
|
|
54
web/app/Livewire/JobQueueNotifications.php
Normal file
54
web/app/Livewire/JobQueueNotifications.php
Normal file
|
@ -0,0 +1,54 @@
|
|||
<?php
|
||||
|
||||
namespace App\Livewire;
|
||||
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Livewire\Component;
|
||||
|
||||
class JobQueueNotifications extends Component
|
||||
{
|
||||
|
||||
public function render(): View
|
||||
{
|
||||
|
||||
$jobs = [];
|
||||
$getJobs = DB::table('jobs')->orderBy('id', 'desc')->get();
|
||||
foreach ($getJobs as $job) {
|
||||
$job->payload = json_decode($job->payload);
|
||||
if (isset($job->payload->displayName)) {
|
||||
$displayName = 'Unknown Job';
|
||||
$displayDisplayDescription = '';
|
||||
|
||||
try {
|
||||
|
||||
$jobClassInstance = new \ReflectionClass($job->payload->displayName);
|
||||
if ($jobClassInstance->getStaticPropertyValue('displayName')) {
|
||||
$displayName = $jobClassInstance->getStaticPropertyValue('displayName');
|
||||
}
|
||||
if ($jobClassInstance->getStaticPropertyValue('displayDescription')) {
|
||||
$displayDisplayDescription = $jobClassInstance->getStaticPropertyValue('displayDescription');
|
||||
}
|
||||
|
||||
} catch (\Exception $e) {
|
||||
$explodeDisplayName = explode('\\', $job->payload->displayName);
|
||||
$displayName = end($explodeDisplayName);
|
||||
}
|
||||
|
||||
$jobs[] = [
|
||||
'id' => $job->id,
|
||||
'displayName' => $displayName,
|
||||
'displayDescription' => $displayDisplayDescription,
|
||||
'status' => $job->attempts == 0 ? 'Pending' : 'Processing',
|
||||
'createdAt' => $job->created_at
|
||||
];
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return view('filament.job-queue-notifications', [
|
||||
'jobs' => $jobs
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
|
@ -52,13 +52,8 @@ class Backup extends Model
|
|||
});
|
||||
|
||||
static::deleting(function ($model) {
|
||||
if (is_file($model->filepath)) {
|
||||
// ShellApi::safeDelete($model->path, [
|
||||
// Storage::path('backups')
|
||||
// ]);
|
||||
// if (Storage::disk('backups')->exists($model->filepath)) {
|
||||
// Storage::disk('backups')->delete($model->filepath);
|
||||
// }
|
||||
if (is_file($model->file_path)) {
|
||||
shell_exec('rm -rf ' . $model->file_path);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -292,6 +287,9 @@ class Backup extends Model
|
|||
|
||||
file_put_contents($backupTempScript, $shellFileContent);
|
||||
|
||||
// chmod read and delete by owner only
|
||||
chmod($backupTempScript, 0600);
|
||||
|
||||
$processId = shell_exec('bash '.$backupTempScript.' >> ' . $backupLogFilePath . ' & echo $!');
|
||||
$processId = intval($processId);
|
||||
|
||||
|
|
|
@ -227,7 +227,7 @@ class HostingSubscriptionBackup extends Model
|
|||
}
|
||||
|
||||
// With find, we can search for all files,directories (including hidden) in the current directory and zip them
|
||||
$shellFileContent .= 'cd '.$backupTempPath .' && find . -exec zip -r '.$backupFilePath.' {} \;'. PHP_EOL;
|
||||
$shellFileContent .= 'cd '.$backupTempPath .' && find . -exec zip --symlinks -r '.$backupFilePath.' {} \;'. PHP_EOL;
|
||||
|
||||
$shellFileContent .= 'rm -rf '.$backupTempPath.PHP_EOL;
|
||||
$shellFileContent .= 'echo "Backup complete"' . PHP_EOL;
|
||||
|
|
21
web/app/PhyreConfig.php
Normal file
21
web/app/PhyreConfig.php
Normal file
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
class PhyreConfig
|
||||
{
|
||||
public static function get($key, $default = null)
|
||||
{
|
||||
// Parse without sections
|
||||
$configIni = base_path() . "/phyre-config.ini";
|
||||
if (file_exists($configIni)) {
|
||||
$iniArray = parse_ini_file($configIni);
|
||||
if (isset($iniArray[$key])) {
|
||||
return $iniArray[$key];
|
||||
}
|
||||
}
|
||||
|
||||
return $default;
|
||||
}
|
||||
|
||||
}
|
|
@ -14,6 +14,7 @@ use App\Listeners\ModelHostingSubscriptionDeletingListener;
|
|||
use App\Livewire\BackupLog;
|
||||
use App\Livewire\Components\QuickServiceRestartMenu;
|
||||
use App\Livewire\HostingSubscriptionBackupLog;
|
||||
use App\Livewire\JobQueueNotifications;
|
||||
use App\Models\Domain;
|
||||
use App\Models\HostingSubscription;
|
||||
use App\Policies\CustomerPolicy;
|
||||
|
@ -64,6 +65,7 @@ class AppServiceProvider extends ServiceProvider
|
|||
Filament::registerViteTheme('resources/css/app.css');
|
||||
});
|
||||
|
||||
Livewire::component('jobs-queue-notifications', JobQueueNotifications::class);
|
||||
Livewire::component('quick-service-restart-menu', QuickServiceRestartMenu::class);
|
||||
Livewire::component('hosting-subscription-backup-log', HostingSubscriptionBackupLog::class);
|
||||
Livewire::component('backup-log', BackupLog::class);
|
||||
|
|
|
@ -35,12 +35,15 @@ class AdminPanelProvider extends PanelProvider
|
|||
{
|
||||
public function panel(Panel $panel): Panel
|
||||
{
|
||||
|
||||
$panel->default()
|
||||
->darkMode(true)
|
||||
->id('admin')
|
||||
->path('admin')
|
||||
->login()
|
||||
->renderHook(
|
||||
name: PanelsRenderHook::BODY_START,
|
||||
hook: fn (): string => Blade::render('@livewire(\'jobs-queue-notifications\')')
|
||||
)
|
||||
->renderHook(
|
||||
name: PanelsRenderHook::TOPBAR_START,
|
||||
hook: fn (): string => Blade::render('@livewire(\'quick-service-restart-menu\')')
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
"filament/filament": "^3.0",
|
||||
"guzzlehttp/guzzle": "^7.2",
|
||||
"jaocero/radio-deck": "^1.2",
|
||||
"jelix/inifile": "^3.4",
|
||||
"laravel/framework": "^10.10",
|
||||
"laravel/sanctum": "^3.3",
|
||||
"laravel/tinker": "^2.8",
|
||||
|
|
55
web/composer.lock
generated
55
web/composer.lock
generated
|
@ -4,7 +4,7 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "e38d5d5d0adae1e32ecf184f9c90f933",
|
||||
"content-hash": "bc8f7e167f22d774934a3b1001c2fd83",
|
||||
"packages": [
|
||||
{
|
||||
"name": "acmephp/core",
|
||||
|
@ -2666,6 +2666,57 @@
|
|||
],
|
||||
"time": "2024-03-15T10:17:55+00:00"
|
||||
},
|
||||
{
|
||||
"name": "jelix/inifile",
|
||||
"version": "v3.4.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/jelix/inifile.git",
|
||||
"reference": "645adc1a7abd0c21377f557c29eb5a4f723ab3c9"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/jelix/inifile/zipball/645adc1a7abd0c21377f557c29eb5a4f723ab3c9",
|
||||
"reference": "645adc1a7abd0c21377f557c29eb5a4f723ab3c9",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.6.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "8.5.* || 11.0.*"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Jelix\\IniFile\\": "lib/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"LGPL-2.1"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Laurent Jouanneau",
|
||||
"email": "laurent@jelix.org"
|
||||
},
|
||||
{
|
||||
"name": "Loic Mathaud"
|
||||
}
|
||||
],
|
||||
"description": "classes to read and modify ini files by preserving comments and empty lines",
|
||||
"homepage": "http://jelix.org",
|
||||
"keywords": [
|
||||
"files",
|
||||
"ini"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/jelix/inifile/issues",
|
||||
"source": "https://github.com/jelix/inifile/tree/v3.4.0"
|
||||
},
|
||||
"time": "2024-02-13T16:19:28+00:00"
|
||||
},
|
||||
{
|
||||
"name": "kirschbaum-development/eloquent-power-joins",
|
||||
"version": "3.5.6",
|
||||
|
@ -12383,5 +12434,5 @@
|
|||
"php": "^8.1"
|
||||
},
|
||||
"platform-dev": [],
|
||||
"plugin-api-version": "2.3.0"
|
||||
"plugin-api-version": "2.2.0"
|
||||
}
|
||||
|
|
66
web/config.php.example
Normal file
66
web/config.php.example
Normal file
|
@ -0,0 +1,66 @@
|
|||
<?php
|
||||
/**
|
||||
* PhyrePanel - A simple, modern, and powerful hosting panel for Linux.
|
||||
*/
|
||||
|
||||
return [
|
||||
|
||||
'APP_NAME' => 'PhyrePanel',
|
||||
'APP_ENV' => 'local',
|
||||
'APP_KEY' => '',
|
||||
'APP_DEBUG' => true,
|
||||
'APP_URL' => 'http://localhost',
|
||||
|
||||
'LOG_CHANNEL' => 'stack',
|
||||
'LOG_DEPRECATIONS_CHANNEL' => null,
|
||||
'LOG_LEVEL' => 'debug',
|
||||
|
||||
'DB_CONNECTION' => 'sqlite',
|
||||
'DB_HOST' => '127.0.0.1',
|
||||
'DB_PORT' => '3306',
|
||||
'DB_DATABASE' => 'phyrepanel',
|
||||
'DB_USERNAME' => 'root',
|
||||
'DB_PASSWORD' => '',
|
||||
|
||||
'MYSQL_HOST' => '127.0.0.1',
|
||||
'MYSQL_PORT' => '3306',
|
||||
'MYSQL_ROOT_USERNAME' => 'root',
|
||||
'MYSQL_ROOT_PASSWORD' => 'root',
|
||||
|
||||
'BROADCAST_DRIVER' => 'log',
|
||||
'CACHE_DRIVER' => 'file',
|
||||
'FILESYSTEM_DISK' => 'local',
|
||||
'QUEUE_CONNECTION' => 'sync',
|
||||
'SESSION_DRIVER' => 'file',
|
||||
'SESSION_LIFETIME' => '120',
|
||||
|
||||
'MEMCACHED_HOST' => '127.0.0.1',
|
||||
|
||||
'REDIS_HOST' => '127.0.0.1',
|
||||
'REDIS_PASSWORD' => null,
|
||||
'REDIS_PORT' => '6379',
|
||||
|
||||
'MAIL_MAILER' => 'smtp',
|
||||
'MAIL_HOST' => 'mailpit',
|
||||
'MAIL_PORT' => '1025',
|
||||
'MAIL_USERNAME' => null,
|
||||
'MAIL_PASSWORD' => null,
|
||||
'MAIL_ENCRYPTION' => null,
|
||||
'MAIL_FROM_ADDRESS' => 'hello@example.com',
|
||||
'MAIL_FROM_NAME' => 'Example',
|
||||
|
||||
'AWS_ACCESS_KEY_ID' => '',
|
||||
'AWS_SECRET_ACCESS_KEY' => '',
|
||||
'AWS_DEFAULT_REGION' => 'us-east-1',
|
||||
'AWS_BUCKET' => '',
|
||||
'AWS_USE_PATH_STYLE_ENDPOINT' => false,
|
||||
|
||||
'PUSHER_APP_ID' => '',
|
||||
'PUSHER_APP_KEY' => '',
|
||||
'PUSHER_APP_SECRET' => '',
|
||||
'PUSHER_HOST' => '',
|
||||
'PUSHER_PORT' => '443',
|
||||
'PUSHER_SCHEME' => 'https',
|
||||
'PUSHER_APP_CLUSTER' => 'mt1',
|
||||
|
||||
];
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
use Illuminate\Support\Facades\Facade;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use App\PhyreConfig;
|
||||
|
||||
return [
|
||||
|
||||
|
@ -20,16 +21,16 @@ return [
|
|||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Environment
|
||||
| Application PhyreConfig::getironment
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This value determines the "environment" your application is currently
|
||||
| This value determines the "PhyreConfig::getironment" your application is currently
|
||||
| running in. This may determine how you prefer to configure various
|
||||
| services the application utilizes. Set this in your ".env" file.
|
||||
| services the application utilizes. Set this in your ".PhyreConfig::get" file.
|
||||
|
|
||||
*/
|
||||
|
||||
'env' => env('APP_ENV', 'production'),
|
||||
'PhyreConfig::get' => PhyreConfig::get('APP_PhyreConfig::get', 'production'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -42,7 +43,7 @@ return [
|
|||
|
|
||||
*/
|
||||
|
||||
'debug' => (bool) env('APP_DEBUG', false),
|
||||
'debug' => (bool) PhyreConfig::get('APP_DEBUG', false),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -55,9 +56,9 @@ return [
|
|||
|
|
||||
*/
|
||||
|
||||
'url' => env('APP_URL', 'http://localhost'),
|
||||
'url' => PhyreConfig::get('APP_URL', 'http://localhost'),
|
||||
|
||||
'asset_url' => env('ASSET_URL'),
|
||||
'asset_url' => PhyreConfig::get('ASSET_URL'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -122,7 +123,7 @@ return [
|
|||
|
|
||||
*/
|
||||
|
||||
'key' => env('APP_KEY'),
|
||||
'key' => PhyreConfig::get('APP_KEY'),
|
||||
|
||||
'cipher' => 'AES-256-CBC',
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
use App\PhyreConfig;
|
||||
|
||||
return [
|
||||
// The database table name
|
||||
|
@ -19,7 +20,7 @@ return [
|
|||
'notifications' => [
|
||||
'new-device' => [
|
||||
// Send the NewDevice notification
|
||||
'enabled' => env('NEW_DEVICE_NOTIFICATION', true),
|
||||
'enabled' => PhyreConfig::get('NEW_DEVICE_NOTIFICATION', true),
|
||||
|
||||
// Use torann/geoip to attempt to get a location
|
||||
'location' => true,
|
||||
|
@ -29,7 +30,7 @@ return [
|
|||
],
|
||||
'failed-login' => [
|
||||
// Send the FailedLogin notification
|
||||
'enabled' => env('FAILED_LOGIN_NOTIFICATION', false),
|
||||
'enabled' => PhyreConfig::get('FAILED_LOGIN_NOTIFICATION', false),
|
||||
|
||||
// Use torann/geoip to attempt to get a location
|
||||
'location' => true,
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
use App\PhyreConfig;
|
||||
|
||||
return [
|
||||
|
||||
|
@ -15,7 +16,7 @@ return [
|
|||
|
|
||||
*/
|
||||
|
||||
'default' => env('BROADCAST_DRIVER', 'null'),
|
||||
'default' => PhyreConfig::get('BROADCAST_DRIVER', 'null'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -32,16 +33,16 @@ return [
|
|||
|
||||
'pusher' => [
|
||||
'driver' => 'pusher',
|
||||
'key' => env('PUSHER_APP_KEY'),
|
||||
'secret' => env('PUSHER_APP_SECRET'),
|
||||
'app_id' => env('PUSHER_APP_ID'),
|
||||
'key' => PhyreConfig::get('PUSHER_APP_KEY'),
|
||||
'secret' => PhyreConfig::get('PUSHER_APP_SECRET'),
|
||||
'app_id' => PhyreConfig::get('PUSHER_APP_ID'),
|
||||
'options' => [
|
||||
'cluster' => env('PUSHER_APP_CLUSTER'),
|
||||
'host' => env('PUSHER_HOST') ?: 'api-'.env('PUSHER_APP_CLUSTER', 'mt1').'.pusher.com',
|
||||
'port' => env('PUSHER_PORT', 443),
|
||||
'scheme' => env('PUSHER_SCHEME', 'https'),
|
||||
'cluster' => PhyreConfig::get('PUSHER_APP_CLUSTER'),
|
||||
'host' => PhyreConfig::get('PUSHER_HOST') ?: 'api-'.PhyreConfig::get('PUSHER_APP_CLUSTER', 'mt1').'.pusher.com',
|
||||
'port' => PhyreConfig::get('PUSHER_PORT', 443),
|
||||
'scheme' => PhyreConfig::get('PUSHER_SCHEME', 'https'),
|
||||
'encrypted' => true,
|
||||
'useTLS' => env('PUSHER_SCHEME', 'https') === 'https',
|
||||
'useTLS' => PhyreConfig::get('PUSHER_SCHEME', 'https') === 'https',
|
||||
],
|
||||
'client_options' => [
|
||||
// Guzzle client options: https://docs.guzzlephp.org/en/stable/request-options.html
|
||||
|
@ -50,7 +51,7 @@ return [
|
|||
|
||||
'ably' => [
|
||||
'driver' => 'ably',
|
||||
'key' => env('ABLY_KEY'),
|
||||
'key' => PhyreConfig::get('ABLY_KEY'),
|
||||
],
|
||||
|
||||
'redis' => [
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Str;
|
||||
use App\PhyreConfig;
|
||||
|
||||
return [
|
||||
|
||||
|
@ -15,7 +16,7 @@ return [
|
|||
|
|
||||
*/
|
||||
|
||||
'default' => 'array', //env('CACHE_DRIVER', 'file'),
|
||||
'default' => 'array', //PhyreConfig::get('CACHE_DRIVER', 'file'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -57,18 +58,18 @@ return [
|
|||
|
||||
'memcached' => [
|
||||
'driver' => 'memcached',
|
||||
'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
|
||||
'persistent_id' => PhyreConfig::get('MEMCACHED_PERSISTENT_ID'),
|
||||
'sasl' => [
|
||||
env('MEMCACHED_USERNAME'),
|
||||
env('MEMCACHED_PASSWORD'),
|
||||
PhyreConfig::get('MEMCACHED_USERNAME'),
|
||||
PhyreConfig::get('MEMCACHED_PASSWORD'),
|
||||
],
|
||||
'options' => [
|
||||
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
|
||||
],
|
||||
'servers' => [
|
||||
[
|
||||
'host' => env('MEMCACHED_HOST', '127.0.0.1'),
|
||||
'port' => env('MEMCACHED_PORT', 11211),
|
||||
'host' => PhyreConfig::get('MEMCACHED_HOST', '127.0.0.1'),
|
||||
'port' => PhyreConfig::get('MEMCACHED_PORT', 11211),
|
||||
'weight' => 100,
|
||||
],
|
||||
],
|
||||
|
@ -82,11 +83,11 @@ return [
|
|||
|
||||
'dynamodb' => [
|
||||
'driver' => 'dynamodb',
|
||||
'key' => env('AWS_ACCESS_KEY_ID'),
|
||||
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
||||
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
|
||||
'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
|
||||
'endpoint' => env('DYNAMODB_ENDPOINT'),
|
||||
'key' => PhyreConfig::get('AWS_ACCESS_KEY_ID'),
|
||||
'secret' => PhyreConfig::get('AWS_SECRET_ACCESS_KEY'),
|
||||
'region' => PhyreConfig::get('AWS_DEFAULT_REGION', 'us-east-1'),
|
||||
'table' => PhyreConfig::get('DYNAMODB_CACHE_TABLE', 'cache'),
|
||||
'endpoint' => PhyreConfig::get('DYNAMODB_ENDPOINT'),
|
||||
],
|
||||
|
||||
'octane' => [
|
||||
|
@ -106,6 +107,6 @@ return [
|
|||
|
|
||||
*/
|
||||
|
||||
'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache_'),
|
||||
'prefix' => PhyreConfig::get('CACHE_PREFIX', Str::slug(PhyreConfig::get('APP_NAME', 'laravel'), '_').'_cache_'),
|
||||
|
||||
];
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Str;
|
||||
use App\PhyreConfig;
|
||||
|
||||
return [
|
||||
|
||||
|
@ -15,7 +16,7 @@ return [
|
|||
|
|
||||
*/
|
||||
|
||||
'default' => env('DB_CONNECTION', 'mysql'),
|
||||
'default' => PhyreConfig::get('DB_CONNECTION', 'mysql'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -37,10 +38,10 @@ return [
|
|||
|
||||
// 'sqlite' => [
|
||||
// 'driver' => 'sqlite',
|
||||
// 'url' => env('DATABASE_URL'),
|
||||
// 'database' => env('DB_DATABASE', database_path('database.sqlite')),
|
||||
// 'url' => PhyreConfig::get('DATABASE_URL'),
|
||||
// 'database' => PhyreConfig::get('DB_DATABASE', database_path('database.sqlite')),
|
||||
// 'prefix' => '',
|
||||
// 'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
|
||||
// 'foreign_key_constraints' => PhyreConfig::get('DB_FOREIGN_KEYS', true),
|
||||
// ],
|
||||
|
||||
'sqlite' => [
|
||||
|
@ -53,13 +54,13 @@ return [
|
|||
|
||||
'mysql' => [
|
||||
'driver' => 'mysql',
|
||||
'url' => env('DATABASE_URL'),
|
||||
'host' => env('DB_HOST', '127.0.0.1'),
|
||||
'port' => env('DB_PORT', '3306'),
|
||||
'database' => env('DB_DATABASE', 'forge'),
|
||||
'username' => env('DB_USERNAME', 'forge'),
|
||||
'password' => env('DB_PASSWORD', ''),
|
||||
'unix_socket' => env('DB_SOCKET', ''),
|
||||
'url' => PhyreConfig::get('DATABASE_URL'),
|
||||
'host' => PhyreConfig::get('DB_HOST', '127.0.0.1'),
|
||||
'port' => PhyreConfig::get('DB_PORT', '3306'),
|
||||
'database' => PhyreConfig::get('DB_DATABASE', 'forge'),
|
||||
'username' => PhyreConfig::get('DB_USERNAME', 'forge'),
|
||||
'password' => PhyreConfig::get('DB_PASSWORD', ''),
|
||||
'unix_socket' => PhyreConfig::get('DB_SOCKET', ''),
|
||||
'charset' => 'utf8mb4',
|
||||
'collation' => 'utf8mb4_unicode_ci',
|
||||
'prefix' => '',
|
||||
|
@ -67,18 +68,18 @@ return [
|
|||
'strict' => true,
|
||||
'engine' => null,
|
||||
'options' => extension_loaded('pdo_mysql') ? array_filter([
|
||||
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
|
||||
PDO::MYSQL_ATTR_SSL_CA => PhyreConfig::get('MYSQL_ATTR_SSL_CA'),
|
||||
]) : [],
|
||||
],
|
||||
|
||||
'pgsql' => [
|
||||
'driver' => 'pgsql',
|
||||
'url' => env('DATABASE_URL'),
|
||||
'host' => env('DB_HOST', '127.0.0.1'),
|
||||
'port' => env('DB_PORT', '5432'),
|
||||
'database' => env('DB_DATABASE', 'forge'),
|
||||
'username' => env('DB_USERNAME', 'forge'),
|
||||
'password' => env('DB_PASSWORD', ''),
|
||||
'url' => PhyreConfig::get('DATABASE_URL'),
|
||||
'host' => PhyreConfig::get('DB_HOST', '127.0.0.1'),
|
||||
'port' => PhyreConfig::get('DB_PORT', '5432'),
|
||||
'database' => PhyreConfig::get('DB_DATABASE', 'forge'),
|
||||
'username' => PhyreConfig::get('DB_USERNAME', 'forge'),
|
||||
'password' => PhyreConfig::get('DB_PASSWORD', ''),
|
||||
'charset' => 'utf8',
|
||||
'prefix' => '',
|
||||
'prefix_indexes' => true,
|
||||
|
@ -88,17 +89,17 @@ return [
|
|||
|
||||
'sqlsrv' => [
|
||||
'driver' => 'sqlsrv',
|
||||
'url' => env('DATABASE_URL'),
|
||||
'host' => env('DB_HOST', 'localhost'),
|
||||
'port' => env('DB_PORT', '1433'),
|
||||
'database' => env('DB_DATABASE', 'forge'),
|
||||
'username' => env('DB_USERNAME', 'forge'),
|
||||
'password' => env('DB_PASSWORD', ''),
|
||||
'url' => PhyreConfig::get('DATABASE_URL'),
|
||||
'host' => PhyreConfig::get('DB_HOST', 'localhost'),
|
||||
'port' => PhyreConfig::get('DB_PORT', '1433'),
|
||||
'database' => PhyreConfig::get('DB_DATABASE', 'forge'),
|
||||
'username' => PhyreConfig::get('DB_USERNAME', 'forge'),
|
||||
'password' => PhyreConfig::get('DB_PASSWORD', ''),
|
||||
'charset' => 'utf8',
|
||||
'prefix' => '',
|
||||
'prefix_indexes' => true,
|
||||
// 'encrypt' => env('DB_ENCRYPT', 'yes'),
|
||||
// 'trust_server_certificate' => env('DB_TRUST_SERVER_CERTIFICATE', 'false'),
|
||||
// 'encrypt' => PhyreConfig::get('DB_ENCRYPT', 'yes'),
|
||||
// 'trust_server_certificate' => PhyreConfig::get('DB_TRUST_SERVER_CERTIFICATE', 'false'),
|
||||
],
|
||||
|
||||
],
|
||||
|
@ -129,29 +130,29 @@ return [
|
|||
|
||||
'redis' => [
|
||||
|
||||
'client' => env('REDIS_CLIENT', 'phpredis'),
|
||||
'client' => PhyreConfig::get('REDIS_CLIENT', 'phpredis'),
|
||||
|
||||
'options' => [
|
||||
'cluster' => env('REDIS_CLUSTER', 'redis'),
|
||||
'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'),
|
||||
'cluster' => PhyreConfig::get('REDIS_CLUSTER', 'redis'),
|
||||
'prefix' => PhyreConfig::get('REDIS_PREFIX', Str::slug(PhyreConfig::get('APP_NAME', 'laravel'), '_').'_database_'),
|
||||
],
|
||||
|
||||
'default' => [
|
||||
'url' => env('REDIS_URL'),
|
||||
'host' => env('REDIS_HOST', '127.0.0.1'),
|
||||
'username' => env('REDIS_USERNAME'),
|
||||
'password' => env('REDIS_PASSWORD'),
|
||||
'port' => env('REDIS_PORT', '6379'),
|
||||
'database' => env('REDIS_DB', '0'),
|
||||
'url' => PhyreConfig::get('REDIS_URL'),
|
||||
'host' => PhyreConfig::get('REDIS_HOST', '127.0.0.1'),
|
||||
'username' => PhyreConfig::get('REDIS_USERNAME'),
|
||||
'password' => PhyreConfig::get('REDIS_PASSWORD'),
|
||||
'port' => PhyreConfig::get('REDIS_PORT', '6379'),
|
||||
'database' => PhyreConfig::get('REDIS_DB', '0'),
|
||||
],
|
||||
|
||||
'cache' => [
|
||||
'url' => env('REDIS_URL'),
|
||||
'host' => env('REDIS_HOST', '127.0.0.1'),
|
||||
'username' => env('REDIS_USERNAME'),
|
||||
'password' => env('REDIS_PASSWORD'),
|
||||
'port' => env('REDIS_PORT', '6379'),
|
||||
'database' => env('REDIS_CACHE_DB', '1'),
|
||||
'url' => PhyreConfig::get('REDIS_URL'),
|
||||
'host' => PhyreConfig::get('REDIS_HOST', '127.0.0.1'),
|
||||
'username' => PhyreConfig::get('REDIS_USERNAME'),
|
||||
'password' => PhyreConfig::get('REDIS_PASSWORD'),
|
||||
'port' => PhyreConfig::get('REDIS_PORT', '6379'),
|
||||
'database' => PhyreConfig::get('REDIS_CACHE_DB', '1'),
|
||||
],
|
||||
|
||||
],
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
use App\PhyreConfig;
|
||||
|
||||
return [
|
||||
|
||||
|
@ -8,7 +9,7 @@ return [
|
|||
//
|
||||
// // Send the NewDevice notification
|
||||
//
|
||||
// 'enabled' => env('NEW_DEVICE_NOTIFICATION', true),
|
||||
// 'enabled' => PhyreConfig::get('NEW_DEVICE_NOTIFICATION', true),
|
||||
//
|
||||
//
|
||||
//
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
use App\PhyreConfig;
|
||||
|
||||
return [
|
||||
|
||||
|
@ -18,11 +19,11 @@ return [
|
|||
|
||||
// 'echo' => [
|
||||
// 'broadcaster' => 'pusher',
|
||||
// 'key' => env('VITE_PUSHER_APP_KEY'),
|
||||
// 'cluster' => env('VITE_PUSHER_APP_CLUSTER'),
|
||||
// 'wsHost' => env('VITE_PUSHER_HOST'),
|
||||
// 'wsPort' => env('VITE_PUSHER_PORT'),
|
||||
// 'wssPort' => env('VITE_PUSHER_PORT'),
|
||||
// 'key' => PhyreConfig::get('VITE_PUSHER_APP_KEY'),
|
||||
// 'cluster' => PhyreConfig::get('VITE_PUSHER_APP_CLUSTER'),
|
||||
// 'wsHost' => PhyreConfig::get('VITE_PUSHER_HOST'),
|
||||
// 'wsPort' => PhyreConfig::get('VITE_PUSHER_PORT'),
|
||||
// 'wssPort' => PhyreConfig::get('VITE_PUSHER_PORT'),
|
||||
// 'authEndpoint' => '/api/v1/broadcasting/auth',
|
||||
// 'disableStats' => true,
|
||||
// 'encrypted' => true,
|
||||
|
@ -40,7 +41,7 @@ return [
|
|||
|
|
||||
*/
|
||||
|
||||
'default_filesystem_disk' => env('FILAMENT_FILESYSTEM_DISK', 'public'),
|
||||
'default_filesystem_disk' => PhyreConfig::get('FILAMENT_FILESYSTEM_DISK', 'public'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
use App\PhyreConfig;
|
||||
|
||||
return [
|
||||
|
||||
|
@ -13,7 +14,7 @@ return [
|
|||
|
|
||||
*/
|
||||
|
||||
'default' => env('FILESYSTEM_DISK', 'local'),
|
||||
'default' => PhyreConfig::get('FILESYSTEM_DISK', 'local'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -39,20 +40,20 @@ return [
|
|||
'public' => [
|
||||
'driver' => 'local',
|
||||
'root' => storage_path('app/public'),
|
||||
'url' => env('APP_URL').'/storage',
|
||||
'url' => PhyreConfig::get('APP_URL').'/storage',
|
||||
'visibility' => 'public',
|
||||
'throw' => false,
|
||||
],
|
||||
|
||||
's3' => [
|
||||
'driver' => 's3',
|
||||
'key' => env('AWS_ACCESS_KEY_ID'),
|
||||
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
||||
'region' => env('AWS_DEFAULT_REGION'),
|
||||
'bucket' => env('AWS_BUCKET'),
|
||||
'url' => env('AWS_URL'),
|
||||
'endpoint' => env('AWS_ENDPOINT'),
|
||||
'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
|
||||
'key' => PhyreConfig::get('AWS_ACCESS_KEY_ID'),
|
||||
'secret' => PhyreConfig::get('AWS_SECRET_ACCESS_KEY'),
|
||||
'region' => PhyreConfig::get('AWS_DEFAULT_REGION'),
|
||||
'bucket' => PhyreConfig::get('AWS_BUCKET'),
|
||||
'url' => PhyreConfig::get('AWS_URL'),
|
||||
'endpoint' => PhyreConfig::get('AWS_ENDPOINT'),
|
||||
'use_path_style_endpoint' => PhyreConfig::get('AWS_USE_PATH_STYLE_ENDPOINT', false),
|
||||
'throw' => false,
|
||||
],
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
use App\PhyreConfig;
|
||||
|
||||
return [
|
||||
|
||||
|
@ -29,7 +30,7 @@ return [
|
|||
*/
|
||||
|
||||
'bcrypt' => [
|
||||
'rounds' => env('BCRYPT_ROUNDS', 12),
|
||||
'rounds' => PhyreConfig::get('BCRYPT_ROUNDS', 12),
|
||||
'verify' => true,
|
||||
],
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
use App\PhyreConfig;
|
||||
|
||||
return [
|
||||
'default' => 'default',
|
||||
|
@ -18,7 +19,7 @@ return [
|
|||
/*
|
||||
* Edit to include full URL in ui for assets
|
||||
*/
|
||||
'use_absolute_path' => env('L5_SWAGGER_USE_ABSOLUTE_PATH', true),
|
||||
'use_absolute_path' => PhyreConfig::get('L5_SWAGGER_USE_ABSOLUTE_PATH', true),
|
||||
|
||||
/*
|
||||
* File name of the generated json documentation file
|
||||
|
@ -33,7 +34,7 @@ return [
|
|||
/*
|
||||
* Set this to `json` or `yaml` to determine which documentation file to use in UI
|
||||
*/
|
||||
'format_to_use_for_docs' => env('L5_FORMAT_TO_USE_FOR_DOCS', 'json'),
|
||||
'format_to_use_for_docs' => PhyreConfig::get('L5_FORMAT_TO_USE_FOR_DOCS', 'json'),
|
||||
|
||||
/*
|
||||
* Absolute paths to directory containing the swagger annotations are stored.
|
||||
|
@ -87,12 +88,12 @@ return [
|
|||
/*
|
||||
* Edit to set the api's base path
|
||||
*/
|
||||
'base' => env('L5_SWAGGER_BASE_PATH', null),
|
||||
'base' => PhyreConfig::get('L5_SWAGGER_BASE_PATH', null),
|
||||
|
||||
/*
|
||||
* Edit to set path where swagger ui assets should be stored
|
||||
*/
|
||||
'swagger_ui_assets_path' => env('L5_SWAGGER_UI_ASSETS_PATH', 'vendor/swagger-api/swagger-ui/dist/'),
|
||||
'swagger_ui_assets_path' => PhyreConfig::get('L5_SWAGGER_UI_ASSETS_PATH', 'vendor/swagger-api/swagger-ui/dist/'),
|
||||
|
||||
/*
|
||||
* Absolute path to directories that should be excluded from scanning
|
||||
|
@ -145,7 +146,7 @@ return [
|
|||
* Allows to generate specs either for OpenAPI 3.0.0 or OpenAPI 3.1.0.
|
||||
* By default the spec will be in version 3.0.0
|
||||
*/
|
||||
'open_api_spec_version' => env('L5_SWAGGER_OPEN_API_SPEC_VERSION', \L5Swagger\Generator::OPEN_API_DEFAULT_SPEC_VERSION),
|
||||
'open_api_spec_version' => PhyreConfig::get('L5_SWAGGER_OPEN_API_SPEC_VERSION', \L5Swagger\Generator::OPEN_API_DEFAULT_SPEC_VERSION),
|
||||
],
|
||||
|
||||
/*
|
||||
|
@ -220,12 +221,12 @@ return [
|
|||
* Set this to `true` in development mode so that docs would be regenerated on each request
|
||||
* Set this to `false` to disable swagger generation on production
|
||||
*/
|
||||
'generate_always' => env('L5_SWAGGER_GENERATE_ALWAYS', false),
|
||||
'generate_always' => PhyreConfig::get('L5_SWAGGER_GENERATE_ALWAYS', false),
|
||||
|
||||
/*
|
||||
* Set this to `true` to generate a copy of documentation in yaml format
|
||||
*/
|
||||
'generate_yaml_copy' => env('L5_SWAGGER_GENERATE_YAML_COPY', false),
|
||||
'generate_yaml_copy' => PhyreConfig::get('L5_SWAGGER_GENERATE_YAML_COPY', false),
|
||||
|
||||
/*
|
||||
* Edit to trust the proxy's ip address - needed for AWS Load Balancer
|
||||
|
@ -244,7 +245,7 @@ return [
|
|||
* 'method' (sort by HTTP method).
|
||||
* Default is the order returned by the server unchanged.
|
||||
*/
|
||||
'operations_sort' => env('L5_SWAGGER_OPERATIONS_SORT', null),
|
||||
'operations_sort' => PhyreConfig::get('L5_SWAGGER_OPERATIONS_SORT', null),
|
||||
|
||||
/*
|
||||
* Pass the validatorUrl parameter to SwaggerUi init on the JS side.
|
||||
|
@ -263,7 +264,7 @@ return [
|
|||
* 'full' (expands the tags and operations),
|
||||
* 'none' (expands nothing).
|
||||
*/
|
||||
'doc_expansion' => env('L5_SWAGGER_UI_DOC_EXPANSION', 'none'),
|
||||
'doc_expansion' => PhyreConfig::get('L5_SWAGGER_UI_DOC_EXPANSION', 'none'),
|
||||
|
||||
/**
|
||||
* If set, enables filtering. The top bar will show an edit box that
|
||||
|
@ -273,14 +274,14 @@ return [
|
|||
* is case-sensitive matching the filter expression anywhere inside
|
||||
* the tag.
|
||||
*/
|
||||
'filter' => env('L5_SWAGGER_UI_FILTERS', true), // true | false
|
||||
'filter' => PhyreConfig::get('L5_SWAGGER_UI_FILTERS', true), // true | false
|
||||
],
|
||||
|
||||
'authorization' => [
|
||||
/*
|
||||
* If set to true, it persists authorization data, and it would not be lost on browser close/refresh
|
||||
*/
|
||||
'persist_authorization' => env('L5_SWAGGER_UI_PERSIST_AUTHORIZATION', false),
|
||||
'persist_authorization' => PhyreConfig::get('L5_SWAGGER_UI_PERSIST_AUTHORIZATION', false),
|
||||
|
||||
'oauth2' => [
|
||||
/*
|
||||
|
@ -294,7 +295,7 @@ return [
|
|||
* Constants which can be used in annotations
|
||||
*/
|
||||
'constants' => [
|
||||
'L5_SWAGGER_CONST_HOST' => env('L5_SWAGGER_CONST_HOST', 'http://my-default-host.com'),
|
||||
'L5_SWAGGER_CONST_HOST' => PhyreConfig::get('L5_SWAGGER_CONST_HOST', 'http://my-default-host.com'),
|
||||
],
|
||||
],
|
||||
];
|
||||
|
|
|
@ -4,6 +4,7 @@ use Monolog\Handler\NullHandler;
|
|||
use Monolog\Handler\StreamHandler;
|
||||
use Monolog\Handler\SyslogUdpHandler;
|
||||
use Monolog\Processor\PsrLogMessageProcessor;
|
||||
use App\PhyreConfig;
|
||||
|
||||
return [
|
||||
|
||||
|
@ -18,7 +19,7 @@ return [
|
|||
|
|
||||
*/
|
||||
|
||||
'default' => env('LOG_CHANNEL', 'stack'),
|
||||
'default' => PhyreConfig::get('LOG_CHANNEL', 'stack'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -32,7 +33,7 @@ return [
|
|||
*/
|
||||
|
||||
'deprecations' => [
|
||||
'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'),
|
||||
'channel' => PhyreConfig::get('LOG_DEPRECATIONS_CHANNEL', 'null'),
|
||||
'trace' => false,
|
||||
],
|
||||
|
||||
|
@ -61,44 +62,44 @@ return [
|
|||
'single' => [
|
||||
'driver' => 'single',
|
||||
'path' => storage_path('logs/laravel.log'),
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
'level' => PhyreConfig::get('LOG_LEVEL', 'debug'),
|
||||
'replace_placeholders' => true,
|
||||
],
|
||||
|
||||
'daily' => [
|
||||
'driver' => 'daily',
|
||||
'path' => storage_path('logs/laravel.log'),
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
'level' => PhyreConfig::get('LOG_LEVEL', 'debug'),
|
||||
'days' => 14,
|
||||
'replace_placeholders' => true,
|
||||
],
|
||||
|
||||
'slack' => [
|
||||
'driver' => 'slack',
|
||||
'url' => env('LOG_SLACK_WEBHOOK_URL'),
|
||||
'url' => PhyreConfig::get('LOG_SLACK_WEBHOOK_URL'),
|
||||
'username' => 'Laravel Log',
|
||||
'emoji' => ':boom:',
|
||||
'level' => env('LOG_LEVEL', 'critical'),
|
||||
'level' => PhyreConfig::get('LOG_LEVEL', 'critical'),
|
||||
'replace_placeholders' => true,
|
||||
],
|
||||
|
||||
'papertrail' => [
|
||||
'driver' => 'monolog',
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class),
|
||||
'level' => PhyreConfig::get('LOG_LEVEL', 'debug'),
|
||||
'handler' => PhyreConfig::get('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class),
|
||||
'handler_with' => [
|
||||
'host' => env('PAPERTRAIL_URL'),
|
||||
'port' => env('PAPERTRAIL_PORT'),
|
||||
'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'),
|
||||
'host' => PhyreConfig::get('PAPERTRAIL_URL'),
|
||||
'port' => PhyreConfig::get('PAPERTRAIL_PORT'),
|
||||
'connectionString' => 'tls://'.PhyreConfig::get('PAPERTRAIL_URL').':'.PhyreConfig::get('PAPERTRAIL_PORT'),
|
||||
],
|
||||
'processors' => [PsrLogMessageProcessor::class],
|
||||
],
|
||||
|
||||
'stderr' => [
|
||||
'driver' => 'monolog',
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
'level' => PhyreConfig::get('LOG_LEVEL', 'debug'),
|
||||
'handler' => StreamHandler::class,
|
||||
'formatter' => env('LOG_STDERR_FORMATTER'),
|
||||
'formatter' => PhyreConfig::get('LOG_STDERR_FORMATTER'),
|
||||
'with' => [
|
||||
'stream' => 'php://stderr',
|
||||
],
|
||||
|
@ -107,14 +108,14 @@ return [
|
|||
|
||||
'syslog' => [
|
||||
'driver' => 'syslog',
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
'level' => PhyreConfig::get('LOG_LEVEL', 'debug'),
|
||||
'facility' => LOG_USER,
|
||||
'replace_placeholders' => true,
|
||||
],
|
||||
|
||||
'errorlog' => [
|
||||
'driver' => 'errorlog',
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
'level' => PhyreConfig::get('LOG_LEVEL', 'debug'),
|
||||
'replace_placeholders' => true,
|
||||
],
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
use App\PhyreConfig;
|
||||
|
||||
return [
|
||||
|
||||
|
@ -13,7 +14,7 @@ return [
|
|||
|
|
||||
*/
|
||||
|
||||
'default' => env('MAIL_MAILER', 'smtp'),
|
||||
'default' => PhyreConfig::get('MAIL_MAILER', 'smtp'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -36,14 +37,14 @@ return [
|
|||
'mailers' => [
|
||||
'smtp' => [
|
||||
'transport' => 'smtp',
|
||||
'url' => env('MAIL_URL'),
|
||||
'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
|
||||
'port' => env('MAIL_PORT', 587),
|
||||
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
|
||||
'username' => env('MAIL_USERNAME'),
|
||||
'password' => env('MAIL_PASSWORD'),
|
||||
'url' => PhyreConfig::get('MAIL_URL'),
|
||||
'host' => PhyreConfig::get('MAIL_HOST', 'smtp.mailgun.org'),
|
||||
'port' => PhyreConfig::get('MAIL_PORT', 587),
|
||||
'encryption' => PhyreConfig::get('MAIL_ENCRYPTION', 'tls'),
|
||||
'username' => PhyreConfig::get('MAIL_USERNAME'),
|
||||
'password' => PhyreConfig::get('MAIL_PASSWORD'),
|
||||
'timeout' => null,
|
||||
'local_domain' => env('MAIL_EHLO_DOMAIN'),
|
||||
'local_domain' => PhyreConfig::get('MAIL_EHLO_DOMAIN'),
|
||||
],
|
||||
|
||||
'ses' => [
|
||||
|
@ -67,12 +68,12 @@ return [
|
|||
|
||||
'sendmail' => [
|
||||
'transport' => 'sendmail',
|
||||
'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -bs -i'),
|
||||
'path' => PhyreConfig::get('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -bs -i'),
|
||||
],
|
||||
|
||||
'log' => [
|
||||
'transport' => 'log',
|
||||
'channel' => env('MAIL_LOG_CHANNEL'),
|
||||
'channel' => PhyreConfig::get('MAIL_LOG_CHANNEL'),
|
||||
],
|
||||
|
||||
'array' => [
|
||||
|
@ -100,8 +101,8 @@ return [
|
|||
*/
|
||||
|
||||
'from' => [
|
||||
'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
|
||||
'name' => env('MAIL_FROM_NAME', 'Example'),
|
||||
'address' => PhyreConfig::get('MAIL_FROM_ADDRESS', 'hello@example.com'),
|
||||
'name' => PhyreConfig::get('MAIL_FROM_NAME', 'Example'),
|
||||
],
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
use App\PhyreConfig;
|
||||
|
||||
return [
|
||||
|
||||
|
@ -53,19 +54,19 @@ return [
|
|||
|
||||
'sqs' => [
|
||||
'driver' => 'sqs',
|
||||
'key' => env('AWS_ACCESS_KEY_ID'),
|
||||
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
||||
'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
|
||||
'queue' => env('SQS_QUEUE', 'default'),
|
||||
'suffix' => env('SQS_SUFFIX'),
|
||||
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
|
||||
'key' => PhyreConfig::get('AWS_ACCESS_KEY_ID'),
|
||||
'secret' => PhyreConfig::get('AWS_SECRET_ACCESS_KEY'),
|
||||
'prefix' => PhyreConfig::get('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
|
||||
'queue' => PhyreConfig::get('SQS_QUEUE', 'default'),
|
||||
'suffix' => PhyreConfig::get('SQS_SUFFIX'),
|
||||
'region' => PhyreConfig::get('AWS_DEFAULT_REGION', 'us-east-1'),
|
||||
'after_commit' => false,
|
||||
],
|
||||
|
||||
'redis' => [
|
||||
'driver' => 'redis',
|
||||
'connection' => 'default',
|
||||
'queue' => env('REDIS_QUEUE', 'default'),
|
||||
'queue' => PhyreConfig::get('REDIS_QUEUE', 'default'),
|
||||
'retry_after' => 90,
|
||||
'block_for' => null,
|
||||
'after_commit' => false,
|
||||
|
@ -85,7 +86,7 @@ return [
|
|||
*/
|
||||
|
||||
'batching' => [
|
||||
'database' => env('DB_CONNECTION', 'mysql'),
|
||||
'database' => PhyreConfig::get('DB_CONNECTION', 'mysql'),
|
||||
'table' => 'job_batches',
|
||||
],
|
||||
|
||||
|
@ -101,8 +102,8 @@ return [
|
|||
*/
|
||||
|
||||
'failed' => [
|
||||
'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'),
|
||||
'database' => env('DB_CONNECTION', 'mysql'),
|
||||
'driver' => PhyreConfig::get('QUEUE_FAILED_DRIVER', 'database-uuids'),
|
||||
'database' => PhyreConfig::get('DB_CONNECTION', 'mysql'),
|
||||
'table' => 'failed_jobs',
|
||||
],
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
|
||||
use Laravel\Sanctum\Sanctum;
|
||||
use App\PhyreConfig;
|
||||
|
||||
return [
|
||||
|
||||
|
@ -15,7 +16,7 @@ return [
|
|||
|
|
||||
*/
|
||||
|
||||
'stateful' => explode(',', env('SANCTUM_STATEFUL_DOMAINS', sprintf(
|
||||
'stateful' => explode(',', PhyreConfig::get('SANCTUM_STATEFUL_DOMAINS', sprintf(
|
||||
'%s%s',
|
||||
'localhost,localhost:3000,127.0.0.1,127.0.0.1:8000,::1',
|
||||
Sanctum::currentApplicationUrlWithPort()
|
||||
|
@ -61,7 +62,7 @@ return [
|
|||
|
|
||||
*/
|
||||
|
||||
'token_prefix' => env('SANCTUM_TOKEN_PREFIX', ''),
|
||||
'token_prefix' => PhyreConfig::get('SANCTUM_TOKEN_PREFIX', ''),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
use App\PhyreConfig;
|
||||
|
||||
return [
|
||||
|
||||
|
@ -15,20 +16,20 @@ return [
|
|||
*/
|
||||
|
||||
'mailgun' => [
|
||||
'domain' => env('MAILGUN_DOMAIN'),
|
||||
'secret' => env('MAILGUN_SECRET'),
|
||||
'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'),
|
||||
'domain' => PhyreConfig::get('MAILGUN_DOMAIN'),
|
||||
'secret' => PhyreConfig::get('MAILGUN_SECRET'),
|
||||
'endpoint' => PhyreConfig::get('MAILGUN_ENDPOINT', 'api.mailgun.net'),
|
||||
'scheme' => 'https',
|
||||
],
|
||||
|
||||
'postmark' => [
|
||||
'token' => env('POSTMARK_TOKEN'),
|
||||
'token' => PhyreConfig::get('POSTMARK_TOKEN'),
|
||||
],
|
||||
|
||||
'ses' => [
|
||||
'key' => env('AWS_ACCESS_KEY_ID'),
|
||||
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
||||
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
|
||||
'key' => PhyreConfig::get('AWS_ACCESS_KEY_ID'),
|
||||
'secret' => PhyreConfig::get('AWS_SECRET_ACCESS_KEY'),
|
||||
'region' => PhyreConfig::get('AWS_DEFAULT_REGION', 'us-east-1'),
|
||||
],
|
||||
|
||||
];
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Str;
|
||||
use App\PhyreConfig;
|
||||
|
||||
return [
|
||||
|
||||
|
@ -18,7 +19,7 @@ return [
|
|||
|
|
||||
*/
|
||||
|
||||
'driver' => env('SESSION_DRIVER', 'file'),
|
||||
'driver' => PhyreConfig::get('SESSION_DRIVER', 'file'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -31,7 +32,7 @@ return [
|
|||
|
|
||||
*/
|
||||
|
||||
'lifetime' => env('SESSION_LIFETIME', 120),
|
||||
'lifetime' => PhyreConfig::get('SESSION_LIFETIME', 120),
|
||||
|
||||
'expire_on_close' => false,
|
||||
|
||||
|
@ -72,7 +73,7 @@ return [
|
|||
|
|
||||
*/
|
||||
|
||||
'connection' => env('SESSION_CONNECTION'),
|
||||
'connection' => PhyreConfig::get('SESSION_CONNECTION'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -100,7 +101,7 @@ return [
|
|||
|
|
||||
*/
|
||||
|
||||
'store' => env('SESSION_STORE'),
|
||||
'store' => PhyreConfig::get('SESSION_STORE'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -126,9 +127,9 @@ return [
|
|||
|
|
||||
*/
|
||||
|
||||
'cookie' => env(
|
||||
'cookie' => PhyreConfig::get(
|
||||
'SESSION_COOKIE',
|
||||
Str::slug(env('APP_NAME', 'laravel'), '_').'_session'
|
||||
Str::slug(PhyreConfig::get('APP_NAME', 'laravel'), '_').'_session'
|
||||
),
|
||||
|
||||
/*
|
||||
|
@ -155,7 +156,7 @@ return [
|
|||
|
|
||||
*/
|
||||
|
||||
'domain' => env('SESSION_DOMAIN'),
|
||||
'domain' => PhyreConfig::get('SESSION_DOMAIN'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -168,7 +169,7 @@ return [
|
|||
|
|
||||
*/
|
||||
|
||||
'secure' => env('SESSION_SECURE_COOKIE'),
|
||||
'secure' => PhyreConfig::get('SESSION_SECURE_COOKIE'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
use App\PhyreConfig;
|
||||
|
||||
return [
|
||||
|
||||
|
@ -28,7 +29,7 @@ return [
|
|||
|
|
||||
*/
|
||||
|
||||
'compiled' => env(
|
||||
'compiled' => PhyreConfig::get(
|
||||
'VIEW_COMPILED_PATH',
|
||||
realpath(storage_path('framework/views'))
|
||||
),
|
||||
|
|
|
@ -1,38 +1,40 @@
|
|||
APP_NAME=Laravel
|
||||
[app]
|
||||
APP_NAME=PHYRE_PANEL
|
||||
APP_ENV=local
|
||||
APP_KEY=
|
||||
APP_DEBUG=true
|
||||
APP_URL=http://localhost
|
||||
APP_URL="http://localhost"
|
||||
|
||||
[log]
|
||||
LOG_CHANNEL=stack
|
||||
LOG_DEPRECATIONS_CHANNEL=null
|
||||
LOG_LEVEL=debug
|
||||
|
||||
DB_CONNECTION=sqlite
|
||||
[database]
|
||||
DB_CONNECTION=mysql
|
||||
DB_HOST=127.0.0.1
|
||||
DB_PORT=3306
|
||||
DB_DATABASE=laravel
|
||||
DB_USERNAME=root
|
||||
DB_DATABASE=
|
||||
DB_USERNAME=
|
||||
DB_PASSWORD=
|
||||
|
||||
MYSQL_HOST=127.0.0.1
|
||||
MYSQL_PORT=3306
|
||||
MYSQL_ROOT_USERNAME=root
|
||||
MYSQL_ROOT_PASSWORD=root
|
||||
MYSQL_ROOT_USERNAME=
|
||||
MYSQL_ROOT_PASSWORD=
|
||||
|
||||
[cache]
|
||||
BROADCAST_DRIVER=log
|
||||
CACHE_DRIVER=file
|
||||
FILESYSTEM_DISK=local
|
||||
QUEUE_CONNECTION=sync
|
||||
SESSION_DRIVER=file
|
||||
SESSION_LIFETIME=120
|
||||
|
||||
MEMCACHED_HOST=127.0.0.1
|
||||
|
||||
REDIS_HOST=127.0.0.1
|
||||
REDIS_PASSWORD=null
|
||||
REDIS_PORT=6379
|
||||
|
||||
[mail]
|
||||
MAIL_MAILER=smtp
|
||||
MAIL_HOST=mailpit
|
||||
MAIL_PORT=1025
|
||||
|
@ -40,14 +42,16 @@ MAIL_USERNAME=null
|
|||
MAIL_PASSWORD=null
|
||||
MAIL_ENCRYPTION=null
|
||||
MAIL_FROM_ADDRESS="hello@example.com"
|
||||
MAIL_FROM_NAME="${APP_NAME}"
|
||||
MAIL_FROM_NAME=PHYRE_PANEL
|
||||
|
||||
[aws]
|
||||
AWS_ACCESS_KEY_ID=
|
||||
AWS_SECRET_ACCESS_KEY=
|
||||
AWS_DEFAULT_REGION=us-east-1
|
||||
AWS_BUCKET=
|
||||
AWS_USE_PATH_STYLE_ENDPOINT=false
|
||||
|
||||
[pusher]
|
||||
PUSHER_APP_ID=
|
||||
PUSHER_APP_KEY=
|
||||
PUSHER_APP_SECRET=
|
||||
|
@ -56,9 +60,9 @@ PUSHER_PORT=443
|
|||
PUSHER_SCHEME=https
|
||||
PUSHER_APP_CLUSTER=mt1
|
||||
|
||||
VITE_APP_NAME="${APP_NAME}"
|
||||
VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
|
||||
VITE_PUSHER_HOST="${PUSHER_HOST}"
|
||||
VITE_PUSHER_PORT="${PUSHER_PORT}"
|
||||
VITE_PUSHER_SCHEME="${PUSHER_SCHEME}"
|
||||
VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
|
||||
VITE_APP_NAME=PHYRE_PANEL
|
||||
VITE_PUSHER_APP_KEY=
|
||||
VITE_PUSHER_HOST=
|
||||
VITE_PUSHER_PORT=443
|
||||
VITE_PUSHER_SCHEME=https
|
||||
VITE_PUSHER_APP_CLUSTER=mt1
|
|
@ -1,12 +1,12 @@
|
|||
[program:phyre-worker]
|
||||
process_name=%(program_name)s_%(process_num)02d
|
||||
command=phyre-php /usr/local/phyre/web/artisan queue:work --sleep=3 --tries=3 --max-time=3600
|
||||
command=phyre-php /usr/local/phyre/web/artisan queue:work --sleep=3 --tries=3 --timeout=0
|
||||
autostart=true
|
||||
autorestart=true
|
||||
stopasgroup=true
|
||||
killasgroup=true
|
||||
user=root
|
||||
numprocs=8
|
||||
numprocs={{ $workersCount }}
|
||||
redirect_stderr=true
|
||||
stdout_logfile=/usr/local/phyre/web/storage/logs/worker.log
|
||||
stopwaitsecs=3600
|
|
@ -0,0 +1,44 @@
|
|||
<div>
|
||||
|
||||
<script>
|
||||
let hiddenJobQueueNotifications = [];
|
||||
function hideJobQueueNotification(jobId) {
|
||||
hiddenJobQueueNotifications.push(jobId);
|
||||
document.getElementById('job-queue-' + jobId).style.display = 'none';
|
||||
document.cookie = "hideJobQueueIds=" + JSON.stringify(hiddenJobQueueNotifications);
|
||||
}
|
||||
</script>
|
||||
|
||||
@foreach($jobs as $job)
|
||||
|
||||
<div id="job-queue-{{$job['id']}}" class="fixed z-50 bottom-5 right-5 w-[24rem] rounded-xl text-black dark:text-white px-4 py-4 shadow-sm bg-white ring-1 ring-gray-950/5 dark:bg-gray-900 dark:ring-white/10">
|
||||
|
||||
<div class="w-full flex justify-between">
|
||||
<div class="text-gray-500 dark:text-gray-400">
|
||||
{{ $job['displayName'] }}
|
||||
</div>
|
||||
<div>
|
||||
<svg onclick="hideJobQueueNotification('{{$job['id']}}')" xmlns="http://www.w3.org/2000/svg" class="w-4 text-gray-500 dark:text-gray-400 cursor-pointer" viewBox="0 0 24 24">
|
||||
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5" d="m7 7l10 10M7 17L17 7" />
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex gap-2 items-center mt-2">
|
||||
<div class="text-sm">
|
||||
@if(!empty($job['displayDescription']))
|
||||
{{ $job['displayDescription'] }}
|
||||
@else
|
||||
Running...
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="animate-pulse mt-2">
|
||||
<div class="h-1 bg-primary-500 rounded-xl"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@endforeach
|
||||
</div>
|
Loading…
Reference in a new issue