forked from coollabsio/coolify
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
09ab641
commit c8434ac
Showing
14 changed files
with
97 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,4 +19,4 @@ yarn-error.log | |
/.vscode | ||
/.npm | ||
/.bash_history | ||
/_volumes/* | ||
/_volumes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
namespace Database\Seeders; | ||
|
||
use App\Models\PrivateKey; | ||
use App\Models\Project; | ||
use App\Models\Team; | ||
use Illuminate\Database\Seeder; | ||
use Illuminate\Support\Facades\Storage; | ||
|
||
class ProductionSeeder extends Seeder | ||
{ | ||
public function run(): void | ||
{ | ||
$coolify_key = Storage::disk('local')->get('ssh-keys/coolify.dsa'); | ||
if (PrivateKey::where('name', 'Coolify Host')->doesntExist()) { | ||
PrivateKey::create([ | ||
"id" => 0, | ||
"name" => "Coolify Host", | ||
"description" => "This is the private key for the server where Coolify is hosted.", | ||
"private_key" => $coolify_key, | ||
]); | ||
} else { | ||
dump('Coolify SSH Key already exists.'); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,5 +14,6 @@ | |
@csrf | ||
<button type="submit">Logout</button> | ||
</form> | ||
<livewire:check-update> | ||
@endauth | ||
</nav> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<div> | ||
<button wire:click='checkUpdate'>Updates</button> | ||
{{ $updateAvailable ? 'Update available' : 'No updates' }} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters