@@ -7,7 +7,6 @@ use App\Jobs\CleanupInstanceStuffsJob;
|
|||||||
use App\Jobs\CleanupStaleMultiplexedConnections;
|
use App\Jobs\CleanupStaleMultiplexedConnections;
|
||||||
use App\Jobs\DatabaseBackupJob;
|
use App\Jobs\DatabaseBackupJob;
|
||||||
use App\Jobs\DockerCleanupJob;
|
use App\Jobs\DockerCleanupJob;
|
||||||
use App\Jobs\CleanupSshKeysJob;
|
|
||||||
use App\Jobs\PullHelperImageJob;
|
use App\Jobs\PullHelperImageJob;
|
||||||
use App\Jobs\PullSentinelImageJob;
|
use App\Jobs\PullSentinelImageJob;
|
||||||
use App\Jobs\PullTemplatesFromCDN;
|
use App\Jobs\PullTemplatesFromCDN;
|
||||||
@@ -45,7 +44,7 @@ class Kernel extends ConsoleKernel
|
|||||||
|
|
||||||
$schedule->command('telescope:prune')->daily();
|
$schedule->command('telescope:prune')->daily();
|
||||||
|
|
||||||
$schedule->job(new CleanupSshKeysJob)->weekly()->onOneServer();
|
$schedule->job(new PullHelperImageJob)->everyFiveMinutes()->onOneServer();
|
||||||
} else {
|
} else {
|
||||||
// Instance Jobs
|
// Instance Jobs
|
||||||
$schedule->command('horizon:snapshot')->everyFiveMinutes();
|
$schedule->command('horizon:snapshot')->everyFiveMinutes();
|
||||||
@@ -62,8 +61,6 @@ class Kernel extends ConsoleKernel
|
|||||||
|
|
||||||
$schedule->command('cleanup:database --yes')->daily();
|
$schedule->command('cleanup:database --yes')->daily();
|
||||||
$schedule->command('uploads:clear')->everyTwoMinutes();
|
$schedule->command('uploads:clear')->everyTwoMinutes();
|
||||||
|
|
||||||
$schedule->job(new CleanupSshKeysJob)->weekly()->onOneServer();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -82,12 +79,12 @@ class Kernel extends ConsoleKernel
|
|||||||
}
|
}
|
||||||
})->cron($settings->update_check_frequency)->timezone($settings->instance_timezone)->onOneServer();
|
})->cron($settings->update_check_frequency)->timezone($settings->instance_timezone)->onOneServer();
|
||||||
}
|
}
|
||||||
$schedule->job(new PullHelperImageJob($server))
|
}
|
||||||
|
$schedule->job(new PullHelperImageJob)
|
||||||
->cron($settings->update_check_frequency)
|
->cron($settings->update_check_frequency)
|
||||||
->timezone($settings->instance_timezone)
|
->timezone($settings->instance_timezone)
|
||||||
->onOneServer();
|
->onOneServer();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private function schedule_updates($schedule)
|
private function schedule_updates($schedule)
|
||||||
{
|
{
|
||||||
|
@@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
namespace App\Helpers;
|
namespace App\Helpers;
|
||||||
|
|
||||||
use App\Models\Server;
|
|
||||||
use App\Models\PrivateKey;
|
use App\Models\PrivateKey;
|
||||||
use Illuminate\Support\Facades\Process;
|
use App\Models\Server;
|
||||||
use Illuminate\Support\Facades\Hash;
|
use Illuminate\Support\Facades\Hash;
|
||||||
|
use Illuminate\Support\Facades\Process;
|
||||||
|
|
||||||
class SshMultiplexingHelper
|
class SshMultiplexingHelper
|
||||||
{
|
{
|
||||||
@@ -127,7 +127,7 @@ class SshMultiplexingHelper
|
|||||||
|
|
||||||
self::addCloudflareProxyCommand($scp_command, $server);
|
self::addCloudflareProxyCommand($scp_command, $server);
|
||||||
|
|
||||||
$scp_command .= self::getCommonSshOptions($server, $sshKeyLocation, config('constants.ssh.connection_timeout'), config('constants.ssh.server_interval'));
|
$scp_command .= self::getCommonSshOptions($server, $sshKeyLocation, config('constants.ssh.connection_timeout'), config('constants.ssh.server_interval'), isScp: true);
|
||||||
$scp_command .= "{$source} {$server->user}@{$server->ip}:{$dest}";
|
$scp_command .= "{$source} {$server->user}@{$server->ip}:{$dest}";
|
||||||
|
|
||||||
return $scp_command;
|
return $scp_command;
|
||||||
@@ -190,15 +190,23 @@ class SshMultiplexingHelper
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function getCommonSshOptions(Server $server, string $sshKeyLocation, int $connectionTimeout, int $serverInterval): string
|
private static function getCommonSshOptions(Server $server, string $sshKeyLocation, int $connectionTimeout, int $serverInterval, bool $isScp = false): string
|
||||||
{
|
{
|
||||||
return "-i {$sshKeyLocation} "
|
$options = "-i {$sshKeyLocation} "
|
||||||
.'-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null '
|
.'-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null '
|
||||||
.'-o PasswordAuthentication=no '
|
.'-o PasswordAuthentication=no '
|
||||||
."-o ConnectTimeout=$connectionTimeout "
|
."-o ConnectTimeout=$connectionTimeout "
|
||||||
."-o ServerAliveInterval=$serverInterval "
|
."-o ServerAliveInterval=$serverInterval "
|
||||||
.'-o RequestTTY=no '
|
.'-o RequestTTY=no '
|
||||||
.'-o LogLevel=ERROR '
|
.'-o LogLevel=ERROR ';
|
||||||
."-p {$server->port} ";
|
|
||||||
|
// Bruh
|
||||||
|
if ($isScp) {
|
||||||
|
$options .= "-P {$server->port} ";
|
||||||
|
} else {
|
||||||
|
$options .= "-p {$server->port} ";
|
||||||
|
}
|
||||||
|
|
||||||
|
return $options;
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -969,7 +969,7 @@ class ApplicationDeploymentJob implements ShouldBeEncrypted, ShouldQueue
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($this->application->environment_variables->where('key', 'COOLIFY_URL')->isEmpty()) {
|
if ($this->application->environment_variables->where('key', 'COOLIFY_URL')->isEmpty()) {
|
||||||
$url = str($this->application->fqdn)->replace('http://', '').replace('https://', '');
|
$url = str($this->application->fqdn)->replace('http://', '')->replace('https://', '');
|
||||||
if ($this->application->compose_parsing_version === '3') {
|
if ($this->application->compose_parsing_version === '3') {
|
||||||
$envs->push("COOLIFY_FQDN={$url}");
|
$envs->push("COOLIFY_FQDN={$url}");
|
||||||
} else {
|
} else {
|
||||||
@@ -1442,7 +1442,7 @@ class ApplicationDeploymentJob implements ShouldBeEncrypted, ShouldQueue
|
|||||||
if ($this->pull_request_id !== 0) {
|
if ($this->pull_request_id !== 0) {
|
||||||
$local_branch = "pull/{$this->pull_request_id}/head";
|
$local_branch = "pull/{$this->pull_request_id}/head";
|
||||||
}
|
}
|
||||||
$private_key = $this->application->privateKey->getKeyLocation();
|
$private_key = $this->application->privateKey?->getKeyLocation();
|
||||||
if ($private_key) {
|
if ($private_key) {
|
||||||
$this->execute_remote_command(
|
$this->execute_remote_command(
|
||||||
[
|
[
|
||||||
|
@@ -9,7 +9,6 @@ use Illuminate\Contracts\Queue\ShouldBeEncrypted;
|
|||||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||||
use Illuminate\Foundation\Bus\Dispatchable;
|
use Illuminate\Foundation\Bus\Dispatchable;
|
||||||
use Illuminate\Queue\InteractsWithQueue;
|
use Illuminate\Queue\InteractsWithQueue;
|
||||||
use Illuminate\Queue\Middleware\WithoutOverlapping;
|
|
||||||
use Illuminate\Queue\SerializesModels;
|
use Illuminate\Queue\SerializesModels;
|
||||||
use Illuminate\Support\Facades\Http;
|
use Illuminate\Support\Facades\Http;
|
||||||
|
|
||||||
@@ -19,17 +18,7 @@ class PullHelperImageJob implements ShouldBeEncrypted, ShouldQueue
|
|||||||
|
|
||||||
public $timeout = 1000;
|
public $timeout = 1000;
|
||||||
|
|
||||||
public function middleware(): array
|
public function __construct() {}
|
||||||
{
|
|
||||||
return [(new WithoutOverlapping($this->server->uuid))];
|
|
||||||
}
|
|
||||||
|
|
||||||
public function uniqueId(): string
|
|
||||||
{
|
|
||||||
return $this->server->uuid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function __construct(public Server $server) {}
|
|
||||||
|
|
||||||
public function handle(): void
|
public function handle(): void
|
||||||
{
|
{
|
||||||
|
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Livewire\Project\Shared;
|
namespace App\Livewire\Project\Shared;
|
||||||
|
|
||||||
|
use App\Helpers\SshMultiplexingHelper;
|
||||||
use App\Models\Server;
|
use App\Models\Server;
|
||||||
use Livewire\Attributes\On;
|
use Livewire\Attributes\On;
|
||||||
use Livewire\Component;
|
use Livewire\Component;
|
||||||
@@ -19,9 +20,9 @@ class Terminal extends Component
|
|||||||
if ($status !== 'running') {
|
if ($status !== 'running') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$command = generateSshCommand($server, "docker exec -it {$identifier} sh -c 'if [ -f ~/.profile ]; then . ~/.profile; fi; if [ -n \"\$SHELL\" ]; then exec \$SHELL; else sh; fi'");
|
$command = SshMultiplexingHelper::generateSshCommand($server, "docker exec -it {$identifier} sh -c 'if [ -f ~/.profile ]; then . ~/.profile; fi; if [ -n \"\$SHELL\" ]; then exec \$SHELL; else sh; fi'");
|
||||||
} else {
|
} else {
|
||||||
$command = generateSshCommand($server, "sh -c 'if [ -f ~/.profile ]; then . ~/.profile; fi; if [ -n \"\$SHELL\" ]; then exec \$SHELL; else sh; fi'");
|
$command = SshMultiplexingHelper::generateSshCommand($server, "sh -c 'if [ -f ~/.profile ]; then . ~/.profile; fi; if [ -n \"\$SHELL\" ]; then exec \$SHELL; else sh; fi'");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ssh command is sent back to frontend then to websocket
|
// ssh command is sent back to frontend then to websocket
|
||||||
|
@@ -29,7 +29,7 @@ class Show extends Component
|
|||||||
try {
|
try {
|
||||||
$this->private_key = PrivateKey::ownedByCurrentTeam(['name', 'description', 'private_key', 'is_git_related'])->whereUuid(request()->private_key_uuid)->firstOrFail();
|
$this->private_key = PrivateKey::ownedByCurrentTeam(['name', 'description', 'private_key', 'is_git_related'])->whereUuid(request()->private_key_uuid)->firstOrFail();
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
return handleError($e, $this);
|
abort(404);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -46,6 +46,7 @@ class Show extends Component
|
|||||||
try {
|
try {
|
||||||
$this->private_key->safeDelete();
|
$this->private_key->safeDelete();
|
||||||
currentTeam()->privateKeys = PrivateKey::where('team_id', currentTeam()->id)->get();
|
currentTeam()->privateKeys = PrivateKey::where('team_id', currentTeam()->id)->get();
|
||||||
|
|
||||||
return redirect()->route('security.private-key.index');
|
return redirect()->route('security.private-key.index');
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
$this->dispatch('error', $e->getMessage());
|
$this->dispatch('error', $e->getMessage());
|
||||||
@@ -58,7 +59,7 @@ class Show extends Component
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$this->private_key->updatePrivateKey([
|
$this->private_key->updatePrivateKey([
|
||||||
'private_key' => formatPrivateKey($this->private_key->private_key)
|
'private_key' => formatPrivateKey($this->private_key->private_key),
|
||||||
]);
|
]);
|
||||||
refresh_server_connection($this->private_key);
|
refresh_server_connection($this->private_key);
|
||||||
$this->dispatch('success', 'Private key updated.');
|
$this->dispatch('success', 'Private key updated.');
|
||||||
|
@@ -39,6 +39,7 @@ class Proxy extends Component
|
|||||||
{
|
{
|
||||||
$this->server->proxy = null;
|
$this->server->proxy = null;
|
||||||
$this->server->save();
|
$this->server->save();
|
||||||
|
$this->dispatch('proxyChanged');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function selectProxy($proxy_type)
|
public function selectProxy($proxy_type)
|
||||||
@@ -47,7 +48,7 @@ class Proxy extends Component
|
|||||||
$this->server->proxy->set('type', $proxy_type);
|
$this->server->proxy->set('type', $proxy_type);
|
||||||
$this->server->save();
|
$this->server->save();
|
||||||
$this->selectedProxy = $this->server->proxy->type;
|
$this->selectedProxy = $this->server->proxy->type;
|
||||||
if ($this->selectedProxy !== 'NONE') {
|
if ($this->server->proxySet()) {
|
||||||
StartProxy::run($this->server, false);
|
StartProxy::run($this->server, false);
|
||||||
}
|
}
|
||||||
$this->dispatch('proxyStatusUpdated');
|
$this->dispatch('proxyStatusUpdated');
|
||||||
|
@@ -31,6 +31,7 @@ class Deploy extends Component
|
|||||||
'serverRefresh' => 'proxyStatusUpdated',
|
'serverRefresh' => 'proxyStatusUpdated',
|
||||||
'checkProxy',
|
'checkProxy',
|
||||||
'startProxy',
|
'startProxy',
|
||||||
|
'proxyChanged' => 'proxyStatusUpdated',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -11,7 +11,7 @@ class Show extends Component
|
|||||||
|
|
||||||
public $parameters = [];
|
public $parameters = [];
|
||||||
|
|
||||||
protected $listeners = ['proxyStatusUpdated'];
|
protected $listeners = ['proxyStatusUpdated', 'proxyChanged' => 'proxyStatusUpdated'];
|
||||||
|
|
||||||
public function proxyStatusUpdated()
|
public function proxyStatusUpdated()
|
||||||
{
|
{
|
||||||
|
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
namespace App\Livewire\Server;
|
namespace App\Livewire\Server;
|
||||||
|
|
||||||
|
use App\Models\PrivateKey;
|
||||||
use App\Models\Server;
|
use App\Models\Server;
|
||||||
use Livewire\Component;
|
use Livewire\Component;
|
||||||
use App\Models\PrivateKey;
|
|
||||||
|
|
||||||
class ShowPrivateKey extends Component
|
class ShowPrivateKey extends Component
|
||||||
{
|
{
|
||||||
@@ -34,7 +34,7 @@ class ShowPrivateKey extends Component
|
|||||||
$this->dispatch('success', 'Server is reachable.');
|
$this->dispatch('success', 'Server is reachable.');
|
||||||
} else {
|
} else {
|
||||||
ray($error);
|
ray($error);
|
||||||
$this->dispatch('error', 'Server is not reachable.<br>Please validate your configuration and connection.<br><br>Check this <a target="_blank" class="underline" href="https://coolify.io/docs/knowledge-base/server/openssh">documentation</a> for further help.');
|
$this->dispatch('error', 'Server is not reachable.<br><br>Check this <a target="_blank" class="underline" href="https://coolify.io/docs/knowledge-base/server/openssh">documentation</a> for further help.<br><br>Error: '.$error);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@@ -5,7 +5,6 @@ namespace App\Models;
|
|||||||
use App\Actions\Server\InstallDocker;
|
use App\Actions\Server\InstallDocker;
|
||||||
use App\Enums\ProxyTypes;
|
use App\Enums\ProxyTypes;
|
||||||
use App\Jobs\PullSentinelImageJob;
|
use App\Jobs\PullSentinelImageJob;
|
||||||
use App\Notifications\Server\Revived;
|
|
||||||
use Illuminate\Database\Eloquent\Builder;
|
use Illuminate\Database\Eloquent\Builder;
|
||||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
@@ -156,11 +155,17 @@ class Server extends BaseModel
|
|||||||
return $this->hasOne(ServerSetting::class);
|
return $this->hasOne(ServerSetting::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function proxySet()
|
||||||
|
{
|
||||||
|
return $this->proxyType() && $this->proxyType() !== 'NONE' && $this->isFunctional() && ! $this->isSwarmWorker() && ! $this->settings->is_build_server;
|
||||||
|
}
|
||||||
|
|
||||||
public function setupDefault404Redirect()
|
public function setupDefault404Redirect()
|
||||||
{
|
{
|
||||||
$dynamic_conf_path = $this->proxyPath().'/dynamic';
|
$dynamic_conf_path = $this->proxyPath().'/dynamic';
|
||||||
$proxy_type = $this->proxyType();
|
$proxy_type = $this->proxyType();
|
||||||
$redirect_url = $this->proxy->redirect_url;
|
$redirect_url = $this->proxy->redirect_url;
|
||||||
|
ray($proxy_type);
|
||||||
if ($proxy_type === ProxyTypes::TRAEFIK->value) {
|
if ($proxy_type === ProxyTypes::TRAEFIK->value) {
|
||||||
$default_redirect_file = "$dynamic_conf_path/default_redirect_404.yaml";
|
$default_redirect_file = "$dynamic_conf_path/default_redirect_404.yaml";
|
||||||
} elseif ($proxy_type === 'CADDY') {
|
} elseif ($proxy_type === 'CADDY') {
|
||||||
@@ -1160,16 +1165,18 @@ $schema://$host {
|
|||||||
$server = new self($data);
|
$server = new self($data);
|
||||||
$server->privateKey()->associate($privateKey);
|
$server->privateKey()->associate($privateKey);
|
||||||
$server->save();
|
$server->save();
|
||||||
|
|
||||||
return $server;
|
return $server;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function updateWithPrivateKey(array $data, PrivateKey $privateKey = null)
|
public function updateWithPrivateKey(array $data, ?PrivateKey $privateKey = null)
|
||||||
{
|
{
|
||||||
$this->update($data);
|
$this->update($data);
|
||||||
if ($privateKey) {
|
if ($privateKey) {
|
||||||
$this->privateKey()->associate($privateKey);
|
$this->privateKey()->associate($privateKey);
|
||||||
$this->save();
|
$this->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -11,8 +11,8 @@ use App\Models\Server;
|
|||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Illuminate\Support\Facades\Process;
|
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
use Illuminate\Support\Facades\Process;
|
||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
use Spatie\Activitylog\Contracts\Activity;
|
use Spatie\Activitylog\Contracts\Activity;
|
||||||
|
|
||||||
@@ -67,6 +67,7 @@ function instant_scp(string $source, string $dest, Server $server, $throwError =
|
|||||||
if ($exitCode !== 0) {
|
if ($exitCode !== 0) {
|
||||||
return $throwError ? excludeCertainErrors($process->errorOutput(), $exitCode) : null;
|
return $throwError ? excludeCertainErrors($process->errorOutput(), $exitCode) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $output === 'null' ? null : $output;
|
return $output === 'null' ? null : $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -92,6 +93,7 @@ function instant_remote_process(Collection|array $command, Server $server, bool
|
|||||||
if ($exitCode !== 0) {
|
if ($exitCode !== 0) {
|
||||||
return $throwError ? excludeCertainErrors($process->errorOutput(), $exitCode) : null;
|
return $throwError ? excludeCertainErrors($process->errorOutput(), $exitCode) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $output === 'null' ? null : $output;
|
return $output === 'null' ? null : $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -130,10 +132,12 @@ function decode_remote_command_output(?ApplicationDeploymentQueue $application_d
|
|||||||
if (! $is_debug_enabled) {
|
if (! $is_debug_enabled) {
|
||||||
$formatted = $formatted->filter(fn ($i) => $i['hidden'] === false ?? false);
|
$formatted = $formatted->filter(fn ($i) => $i['hidden'] === false ?? false);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $formatted
|
return $formatted
|
||||||
->sortBy(fn ($i) => data_get($i, 'order'))
|
->sortBy(fn ($i) => data_get($i, 'order'))
|
||||||
->map(function ($i) {
|
->map(function ($i) {
|
||||||
data_set($i, 'timestamp', Carbon::parse(data_get($i, 'timestamp'))->format('Y-M-d H:i:s.u'));
|
data_set($i, 'timestamp', Carbon::parse(data_get($i, 'timestamp'))->format('Y-M-d H:i:s.u'));
|
||||||
|
|
||||||
return $i;
|
return $i;
|
||||||
})
|
})
|
||||||
->reduce(function ($deploymentLogLines, $logItem) use ($seenCommands) {
|
->reduce(function ($deploymentLogLines, $logItem) use ($seenCommands) {
|
||||||
@@ -176,6 +180,7 @@ function decode_remote_command_output(?ApplicationDeploymentQueue $application_d
|
|||||||
function remove_iip($text)
|
function remove_iip($text)
|
||||||
{
|
{
|
||||||
$text = preg_replace('/x-access-token:.*?(?=@)/', 'x-access-token:'.REDACTED, $text);
|
$text = preg_replace('/x-access-token:.*?(?=@)/', 'x-access-token:'.REDACTED, $text);
|
||||||
|
|
||||||
return preg_replace('/\x1b\[[0-9;]*m/', '', $text);
|
return preg_replace('/\x1b\[[0-9;]*m/', '', $text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -2,7 +2,9 @@
|
|||||||
<livewire:server.proxy.modal :server="$server" />
|
<livewire:server.proxy.modal :server="$server" />
|
||||||
<div class="flex items-center gap-2">
|
<div class="flex items-center gap-2">
|
||||||
<h1>Server</h1>
|
<h1>Server</h1>
|
||||||
|
@if ($server->proxySet())
|
||||||
<livewire:server.proxy.status :server="$server" />
|
<livewire:server.proxy.status :server="$server" />
|
||||||
|
@endif
|
||||||
</div>
|
</div>
|
||||||
<div class="subtitle">{{ data_get($server, 'name') }}.</div>
|
<div class="subtitle">{{ data_get($server, 'name') }}.</div>
|
||||||
<div class="navbar-main">
|
<div class="navbar-main">
|
||||||
|
@@ -1,20 +1,18 @@
|
|||||||
|
@if ($server->proxySet())
|
||||||
<div class="flex h-full pr-4">
|
<div class="flex h-full pr-4">
|
||||||
<div class="flex flex-col w-48 gap-4 min-w-fit">
|
<div class="flex flex-col w-48 gap-4 min-w-fit">
|
||||||
<a class="{{ request()->routeIs('server.proxy') ? 'dark:text-white' : '' }}"
|
<a class="{{ request()->routeIs('server.proxy') ? 'dark:text-white' : '' }}"
|
||||||
href="{{ route('server.proxy', $parameters) }}">
|
href="{{ route('server.proxy', $parameters) }}">
|
||||||
<button>Configuration</button>
|
<button>Configuration</button>
|
||||||
</a>
|
</a>
|
||||||
@if ($server->proxyType() !== 'NONE')
|
|
||||||
{{-- @if ($server->proxyType() === 'TRAEFIK') --}}
|
|
||||||
<a class="{{ request()->routeIs('server.proxy.dynamic-confs') ? 'dark:text-white' : '' }}"
|
<a class="{{ request()->routeIs('server.proxy.dynamic-confs') ? 'dark:text-white' : '' }}"
|
||||||
href="{{ route('server.proxy.dynamic-confs', $parameters) }}">
|
href="{{ route('server.proxy.dynamic-confs', $parameters) }}">
|
||||||
<button>Dynamic Configurations</button>
|
<button>Dynamic Configurations</button>
|
||||||
</a>
|
</a>
|
||||||
{{-- @endif --}}
|
|
||||||
<a class="{{ request()->routeIs('server.proxy.logs') ? 'dark:text-white' : '' }}"
|
<a class="{{ request()->routeIs('server.proxy.logs') ? 'dark:text-white' : '' }}"
|
||||||
href="{{ route('server.proxy.logs', $parameters) }}">
|
href="{{ route('server.proxy.logs', $parameters) }}">
|
||||||
<button>Logs</button>
|
<button>Logs</button>
|
||||||
</a>
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
@@ -83,9 +83,9 @@
|
|||||||
<x-forms.button class="box" wire:click="selectProxy('CADDY')">
|
<x-forms.button class="box" wire:click="selectProxy('CADDY')">
|
||||||
Caddy
|
Caddy
|
||||||
</x-forms.button>
|
</x-forms.button>
|
||||||
<x-forms.button disabled class="box">
|
{{-- <x-forms.button disabled class="box">
|
||||||
Nginx
|
Nginx
|
||||||
</x-forms.button>
|
</x-forms.button> --}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
@@ -1,10 +1,6 @@
|
|||||||
@php use App\Enums\ProxyTypes; @endphp
|
@php use App\Enums\ProxyTypes; @endphp
|
||||||
<div>
|
<div>
|
||||||
@if (
|
@if ($server->proxySet())
|
||||||
$server->proxyType() !== 'NONE' &&
|
|
||||||
$server->isFunctional() &&
|
|
||||||
!$server->isSwarmWorker() &&
|
|
||||||
!$server->settings->is_build_server)
|
|
||||||
<x-slide-over closeWithX fullScreen @startproxy.window="slideOverOpen = true">
|
<x-slide-over closeWithX fullScreen @startproxy.window="slideOverOpen = true">
|
||||||
<x-slot:title>Proxy Status</x-slot:title>
|
<x-slot:title>Proxy Status</x-slot:title>
|
||||||
<x-slot:content>
|
<x-slot:content>
|
||||||
|
@@ -1,10 +1,4 @@
|
|||||||
<div x-init="$wire.checkProxy()">
|
<div x-init="$wire.checkProxy()" class="flex gap-2">
|
||||||
@if (
|
|
||||||
$server->proxyType() !== 'NONE' &&
|
|
||||||
$server->isFunctional() &&
|
|
||||||
!$server->isSwarmWorker() &&
|
|
||||||
!$server->settings->is_build_server)
|
|
||||||
<div class="flex gap-2">
|
|
||||||
@if (data_get($server, 'proxy.status') === 'running')
|
@if (data_get($server, 'proxy.status') === 'running')
|
||||||
<x-status.running status="Proxy Running" />
|
<x-status.running status="Proxy Running" />
|
||||||
@elseif (data_get($server, 'proxy.status') === 'restarting')
|
@elseif (data_get($server, 'proxy.status') === 'restarting')
|
||||||
@@ -16,5 +10,3 @@
|
|||||||
<x-forms.button wire:click='checkProxy(true)'>Refresh</x-forms.button>
|
<x-forms.button wire:click='checkProxy(true)'>Refresh</x-forms.button>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
@endif
|
|
||||||
</div>
|
|
||||||
|
Reference in New Issue
Block a user