diff --git a/app/Actions/Server/InstallDocker.php b/app/Actions/Server/InstallDocker.php
index 39d0718db..2fb12d34c 100644
--- a/app/Actions/Server/InstallDocker.php
+++ b/app/Actions/Server/InstallDocker.php
@@ -7,7 +7,7 @@
class InstallDocker
{
- public function __invoke(Server $server, bool $instant = false)
+ public function __invoke(Server $server)
{
$dockerVersion = '24.0';
$config = base64_encode('{
@@ -55,9 +55,6 @@ public function __invoke(Server $server, bool $instant = false)
"echo '####### Done!'"
];
}
- if ($instant) {
- return instant_remote_process($command, $server);
- }
return remote_process($command, $server);
}
}
diff --git a/app/Data/CoolifyTaskArgs.php b/app/Data/CoolifyTaskArgs.php
index 07d7c0c81..f73fd6318 100644
--- a/app/Data/CoolifyTaskArgs.php
+++ b/app/Data/CoolifyTaskArgs.php
@@ -17,8 +17,11 @@ public function __construct(
public string $type,
public ?string $type_uuid = null,
public ?Model $model = null,
- public string $status = ProcessStatus::QUEUED->value,
+ public ?string $status = null ,
public bool $ignore_errors = false,
) {
+ if(is_null($status)){
+ $this->status = ProcessStatus::QUEUED->value;
+ }
}
}
diff --git a/app/Http/Livewire/Boarding/Index.php b/app/Http/Livewire/Boarding/Index.php
index fc1784383..7c42df536 100644
--- a/app/Http/Livewire/Boarding/Index.php
+++ b/app/Http/Livewire/Boarding/Index.php
@@ -9,7 +9,6 @@
use App\Models\Team;
use Illuminate\Support\Collection;
use Livewire\Component;
-use Visus\Cuid2\Cuid2;
class Index extends Component
{
@@ -40,8 +39,8 @@ class Index extends Component
public bool $dockerInstallationStarted = false;
- public string $localhostPublicKey;
- public bool $localhostReachable = true;
+ public string $serverPublicKey;
+ public bool $serverReachable = true;
public function mount()
{
@@ -98,7 +97,7 @@ public function setServerType(string $type)
if (!$this->createdServer) {
return $this->emit('error', 'Localhost server is not found. Something went wrong during installation. Please try to reinstall or contact support.');
}
- $this->localhostPublicKey = $this->createdServer->privateKey->publicKey();
+ $this->serverPublicKey = $this->createdServer->privateKey->publicKey();
return $this->validateServer('localhost');
} elseif ($this->selectedServerType === 'remote') {
$this->privateKeys = PrivateKey::ownedByCurrentTeam(['name'])->where('id', '!=', 0)->get();
@@ -123,6 +122,7 @@ public function selectExistingServer()
return;
}
$this->selectedExistingPrivateKey = $this->createdServer->privateKey->id;
+ $this->serverPublicKey = $this->createdServer->privateKey->publicKey();
$this->validateServer();
}
public function getProxyType()
@@ -201,11 +201,11 @@ public function validateServer()
instant_remote_process(['uptime'], $this->createdServer, true);
- $this->createdServer->settings->update([
+ $this->createdServer->settings()->update([
'is_reachable' => true,
]);
} catch (\Throwable $e) {
- $this->localhostReachable = false;
+ $this->serverReachable = false;
return handleError(error: $e, customErrorMessage: $customErrorMessage, livewire: $this);
}
@@ -216,8 +216,12 @@ public function validateServer()
$this->currentState = 'install-docker';
throw new \Exception('Docker version is not supported or not installed.');
}
- $this->dockerInstalledOrSkipped();
+ $this->createdServer->settings()->update([
+ 'is_usable' => true,
+ ]);
+ $this->getProxyType();
} catch (\Throwable $e) {
+ $this->dockerInstallationStarted = false;
return handleError(error: $e, customErrorMessage: $customErrorMessage, livewire: $this);
}
}
@@ -229,10 +233,7 @@ public function installDocker()
}
public function dockerInstalledOrSkipped()
{
- $this->createdServer->settings->update([
- 'is_usable' => true,
- ]);
- $this->getProxyType();
+ $this->validateServer();
}
public function selectProxy(string|null $proxyType = null)
{
diff --git a/bootstrap/helpers/remoteProcess.php b/bootstrap/helpers/remoteProcess.php
index 5982b46d8..7bf194711 100644
--- a/bootstrap/helpers/remoteProcess.php
+++ b/bootstrap/helpers/remoteProcess.php
@@ -18,12 +18,14 @@
function remote_process(
array $command,
Server $server,
- string $type = ActivityTypes::INLINE->value,
+ ?string $type = null,
?string $type_uuid = null,
?Model $model = null,
bool $ignore_errors = false,
): Activity {
-
+ if (is_null($type)) {
+ $type = ActivityTypes::INLINE->value;
+ }
$command_string = implode("\n", $command);
if (auth()->user()) {
$teams = auth()->user()->teams->pluck('id');
diff --git a/bootstrap/helpers/subscriptions.php b/bootstrap/helpers/subscriptions.php
index ac41b1a1d..9ea76ec9b 100644
--- a/bootstrap/helpers/subscriptions.php
+++ b/bootstrap/helpers/subscriptions.php
@@ -138,5 +138,6 @@ function allowedPathsForBoardingAccounts()
...allowedPathsForUnsubscribedAccounts(),
'boarding',
'livewire/message/boarding.index',
+ 'livewire/message/activity-monitor'
];
}
diff --git a/resources/views/layouts/boarding.blade.php b/resources/views/layouts/boarding.blade.php
index 39b1ae252..fe48fc29b 100644
--- a/resources/views/layouts/boarding.blade.php
+++ b/resources/views/layouts/boarding.blade.php
@@ -1,17 +1,17 @@
@extends('layouts.base')
@section('body')
+
+
+
+
+
+
+ Close
+
+
+
-
-
-
-
-
-
- Close
-
-
-
{{ $slot }}
diff --git a/resources/views/livewire/boarding/index.blade.php b/resources/views/livewire/boarding/index.blade.php
index b86320612..37ed1cfd8 100644
--- a/resources/views/livewire/boarding/index.blade.php
+++ b/resources/views/livewire/boarding/index.blade.php
@@ -50,13 +50,13 @@
Remote Server
- @if (!$localhostReachable)
+ @if (!$serverReachable)
Localhost is not reachable with the following public key.
Please make sure you have the correct public key in your ~/.ssh/authorized_keys file for user
'root' or skip the boarding process and add a new private key manually to Coolify and to the
server.
-
+ Check again
@@ -130,6 +130,17 @@
Use this Server
+ @if (!$serverReachable)
+ This server is not reachable with the following public key.
+
+ Please make sure you have the correct public key in your ~/.ssh/authorized_keys file for user
+ 'root' or skip the boarding process and add a new private key manually to Coolify and to the
+ server.
+
+ Check again
+
+ @endif
Private Keys are used to connect to a remote server through a secure shell, called SSH.
@@ -214,10 +225,10 @@
Could not find Docker Engine on your server. Do you want me to install it for you?
+ @if ($dockerInstallationStarted)
Let's do it!
- @if ($dockerInstallationStarted)
Next
@endif