fixes
This commit is contained in:
29
app/Http/Livewire/CheckUpdate.php
Normal file
29
app/Http/Livewire/CheckUpdate.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Livewire;
|
||||
|
||||
use App\Models\Server;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
use Illuminate\Support\Facades\Process;
|
||||
use Livewire\Component;
|
||||
|
||||
class CheckUpdate extends Component
|
||||
{
|
||||
public $updateAvailable = false;
|
||||
public $latestVersion = '4.0.0-nightly.1';
|
||||
protected $currentVersion;
|
||||
protected $image = 'ghcr.io/coollabsio/coolify';
|
||||
|
||||
public function checkUpdate()
|
||||
{
|
||||
$response = Http::get('https://get.coollabs.io/versions.json');
|
||||
$versions = $response->json();
|
||||
// $this->latestVersion = data_get($versions, 'coolify.main.version');
|
||||
$this->currentVersion = config('coolify.version');
|
||||
version_compare($this->currentVersion, $this->latestVersion, '<') ? $this->updateAvailable = true : $this->updateAvailable = false;
|
||||
}
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.check-update');
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Queue\Events\JobProcessed;
|
||||
use Illuminate\Support\Facades\Process;
|
||||
use Illuminate\Support\Facades\Queue;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
@@ -13,6 +14,13 @@ class AppServiceProvider extends ServiceProvider
|
||||
*/
|
||||
public function register(): void
|
||||
{
|
||||
// @TODO: Is this the best place to run the seeder?
|
||||
// if (env('APP_ENV') === 'production') {
|
||||
// dump('Seed default data.');
|
||||
// Process::run('php artisan db:seed --class=ProductionSeeder --force');
|
||||
// } else {
|
||||
// dump('Not in production environment.');
|
||||
// }
|
||||
//
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user