wip
This commit is contained in:
parent
d1b266a361
commit
f5c1533309
@ -15,12 +15,11 @@ class CheckUpdate extends Component
|
|||||||
|
|
||||||
protected function upgrade()
|
protected function upgrade()
|
||||||
{
|
{
|
||||||
$server = Server::where('ip', 'host.docker.internal')->first();
|
$server = Server::where('ip', 'coolify-testing-host')->first();
|
||||||
if (!$server) {
|
if (!$server) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
runRemoteCommandSync($server, ['curl -fsSL https://raw.githubusercontent.com/coollabsio/coolify/v4/scripts/upgrade.sh -o /data/coolify/source/upgrade.sh']);
|
runRemoteCommandSync($server, ["curl -fsSL https://raw.githubusercontent.com/coollabsio/coolify/v4/scripts/upgrade.sh -o /root/upgrade.sh && bash -x /root/upgrade.sh $this->latestVersion"]);
|
||||||
runRemoteCommandSync($server, ["bash /data/coolify/source/upgrade.sh $this->latestVersion"]);
|
|
||||||
}
|
}
|
||||||
public function forceUpgrade()
|
public function forceUpgrade()
|
||||||
{
|
{
|
||||||
|
@ -128,7 +128,7 @@ if (!function_exists('runRemoteCommandSync')) {
|
|||||||
$exitCode = $process->exitCode();
|
$exitCode = $process->exitCode();
|
||||||
if ($exitCode !== 0) {
|
if ($exitCode !== 0) {
|
||||||
Log::error($output);
|
Log::error($output);
|
||||||
// throw new \RuntimeException('There was an error running the command.');
|
throw new \RuntimeException('There was an error running the command.');
|
||||||
}
|
}
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<button wire:click='checkUpdate'>Updates</button>
|
<button wire:click='checkUpdate'>Updates</button>
|
||||||
@env('production')
|
@if (auth()->user()->teams->contains(0))
|
||||||
<button wire:click='forceUpgrade'>Force Upgrade</button>
|
<button wire:click='forceUpgrade'>Force Upgrade</button>
|
||||||
@endenv
|
@endif
|
||||||
{{ $updateAvailable ? 'Update available' : 'No updates' }}
|
{{ $updateAvailable ? 'Update available' : 'No updates' }}
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
## Do not modify this file. You will lost the ability to autoupdate!
|
## Do not modify this file. You will lost the ability to autoupdate!
|
||||||
|
|
||||||
docker run --pull always -v /data/coolify/source:/data/coolify/source -v /var/run/docker.sock:/var/run/docker.sock -ti --rm ghcr.io/coollabsio/coolify-builder bash -c "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"
|
docker run --pull always -v /data/coolify/source:/data/coolify/source -v /var/run/docker.sock:/var/run/docker.sock --rm ghcr.io/coollabsio/coolify-builder bash -c "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…
x
Reference in New Issue
Block a user