refactor: upgrade process of Coolify

This commit is contained in:
Andras Bacsai
2024-09-05 10:15:22 +02:00
parent b241f17eee
commit 4888f4c405
4 changed files with 2 additions and 75 deletions

View File

@@ -4,8 +4,6 @@ namespace App\Actions\Server;
use App\Models\InstanceSettings;
use App\Models\Server;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Facades\Http;
use Lorisleiva\Actions\Concerns\AsAction;
class UpdateCoolify
@@ -27,11 +25,6 @@ class UpdateCoolify
return;
}
CleanupDocker::dispatch($this->server)->onQueue('high');
$response = Http::retry(3, 1000)->get('https://cdn.coollabs.io/coolify/versions.json');
if ($response->successful()) {
$versions = $response->json();
File::put(base_path('versions.json'), json_encode($versions, JSON_PRETTY_PRINT));
}
$this->latestVersion = get_latest_version_of_coolify();
$this->currentVersion = config('version');
if (! $manual_update) {