fix: ec2 does not have uptime command lol
version++
This commit is contained in:
parent
38d367e709
commit
bba1cb3832
@ -206,7 +206,8 @@ public function validateServer()
|
||||
try {
|
||||
config()->set('coolify.mux_enabled', false);
|
||||
|
||||
instant_remote_process(['uptime'], $this->createdServer, true);
|
||||
// EC2 does not have `uptime` command, lol
|
||||
instant_remote_process(['ls'], $this->createdServer, true);
|
||||
|
||||
$this->createdServer->settings()->update([
|
||||
'is_reachable' => true,
|
||||
|
@ -400,7 +400,8 @@ public function validateConnection()
|
||||
if ($server->skipServer()) {
|
||||
return false;
|
||||
}
|
||||
$uptime = instant_remote_process(['uptime'], $server, false);
|
||||
// EC2 does not have `uptime` command, lol
|
||||
$uptime = instant_remote_process(['ls'], $server, false);
|
||||
if (!$uptime) {
|
||||
$server->settings()->update([
|
||||
'is_reachable' => false,
|
||||
|
@ -228,56 +228,6 @@ function refresh_server_connection(?PrivateKey $private_key = null)
|
||||
}
|
||||
}
|
||||
|
||||
// function validateServer(Server $server, bool $throwError = false)
|
||||
// {
|
||||
// try {
|
||||
// $uptime = instant_remote_process(['uptime'], $server, $throwError);
|
||||
// if (!$uptime) {
|
||||
// $server->settings->is_reachable = false;
|
||||
// $server->team->notify(new Unreachable($server));
|
||||
// $server->unreachable_notification_sent = true;
|
||||
// $server->save();
|
||||
// return [
|
||||
// "uptime" => null,
|
||||
// "dockerVersion" => null,
|
||||
// ];
|
||||
// }
|
||||
// $server->settings->is_reachable = true;
|
||||
// instant_remote_process(["docker ps"], $server, $throwError);
|
||||
// $dockerVersion = instant_remote_process(["docker version|head -2|grep -i version| awk '{print $2}'"], $server, $throwError);
|
||||
// if (!$dockerVersion) {
|
||||
// $dockerVersion = null;
|
||||
// return [
|
||||
// "uptime" => $uptime,
|
||||
// "dockerVersion" => null,
|
||||
// ];
|
||||
// }
|
||||
// $dockerVersion = checkMinimumDockerEngineVersion($dockerVersion);
|
||||
// if (is_null($dockerVersion)) {
|
||||
// $server->settings->is_usable = false;
|
||||
// } else {
|
||||
// $server->settings->is_usable = true;
|
||||
// if (data_get($server, 'unreachable_notification_sent') === true) {
|
||||
// $server->team->notify(new Revived($server));
|
||||
// $server->unreachable_notification_sent = false;
|
||||
// $server->save();
|
||||
// }
|
||||
// }
|
||||
// return [
|
||||
// "uptime" => $uptime,
|
||||
// "dockerVersion" => $dockerVersion,
|
||||
// ];
|
||||
// } catch (\Throwable $e) {
|
||||
// $server->settings->is_reachable = false;
|
||||
// $server->settings->is_usable = false;
|
||||
// throw $e;
|
||||
// } finally {
|
||||
// if (data_get($server, 'settings')) {
|
||||
// $server->settings->save();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
function checkRequiredCommands(Server $server)
|
||||
{
|
||||
$commands = collect(["jq", "jc"]);
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
// The release version of your application
|
||||
// Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD'))
|
||||
'release' => '4.0.0-beta.218',
|
||||
'release' => '4.0.0-beta.219',
|
||||
// When left empty or `null` the Laravel environment will be used
|
||||
'environment' => config('app.env'),
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
<?php
|
||||
|
||||
return '4.0.0-beta.218';
|
||||
return '4.0.0-beta.219';
|
||||
|
@ -4,7 +4,7 @@
|
||||
"version": "3.12.36"
|
||||
},
|
||||
"v4": {
|
||||
"version": "4.0.0-beta.218"
|
||||
"version": "4.0.0-beta.219"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user