updates
This commit is contained in:
parent
4d69094a1f
commit
c0c9dacac6
@ -9,7 +9,7 @@
|
||||
class CheckUpdate extends Component
|
||||
{
|
||||
public $updateAvailable = false;
|
||||
public $latestVersion = '4.0.0-nightly.1';
|
||||
public $latestVersion = 'latest';
|
||||
protected $currentVersion;
|
||||
protected $image = 'ghcr.io/coollabsio/coolify';
|
||||
|
||||
@ -20,7 +20,7 @@ protected function upgrade()
|
||||
return;
|
||||
}
|
||||
runRemoteCommandSync($server, ['curl -fsSL https://raw.githubusercontent.com/coollabsio/coolify/v4/scripts/upgrade.sh -o /data/coolify/source/upgrade.sh']);
|
||||
runRemoteCommandSync($server, ['bash /data/coolify/source/upgrade.sh']);
|
||||
runRemoteCommandSync($server, ["bash /data/coolify/source/upgrade.sh $this->latestVersion"]);
|
||||
}
|
||||
public function forceUpgrade()
|
||||
{
|
||||
@ -30,8 +30,12 @@ public function checkUpdate()
|
||||
{
|
||||
$response = Http::get('https://get.coollabs.io/versions.json');
|
||||
$versions = $response->json();
|
||||
// $this->latestVersion = data_get($versions, 'coolify.main.version');
|
||||
$this->latestVersion = data_get($versions, 'coolify.v4.version');
|
||||
$this->currentVersion = config('coolify.version');
|
||||
if ($this->latestVersion === 'latest') {
|
||||
$this->updateAvailable = true;
|
||||
return;
|
||||
}
|
||||
version_compare($this->currentVersion, $this->latestVersion, '<') ? $this->updateAvailable = true : $this->updateAvailable = false;
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
#!/bin/bash
|
||||
## Do not modify this file. You will lost the ability to autoupdate!
|
||||
|
||||
docker compose --env-file /data/coolify/source/.env -f /data/coolify/source/docker-compose.yml -f /data/coolify/source/docker-compose.prod.yml up --pull always
|
||||
export APP_TAG=$1
|
||||
docker compose --env-file /data/coolify/source/.env -f /data/coolify/source/docker-compose.yml -f /data/coolify/source/docker-compose.prod.yml up -d --pull always --remove-orphans --force-recreate
|
||||
|
Loading…
Reference in New Issue
Block a user