wip
This commit is contained in:
parent
d1b266a361
commit
f5c1533309
@ -15,12 +15,11 @@ class CheckUpdate extends Component
|
||||
|
||||
protected function upgrade()
|
||||
{
|
||||
$server = Server::where('ip', 'host.docker.internal')->first();
|
||||
$server = Server::where('ip', 'coolify-testing-host')->first();
|
||||
if (!$server) {
|
||||
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 $this->latestVersion"]);
|
||||
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"]);
|
||||
}
|
||||
public function forceUpgrade()
|
||||
{
|
||||
|
@ -128,7 +128,7 @@ function runRemoteCommandSync($server, array $command)
|
||||
$exitCode = $process->exitCode();
|
||||
if ($exitCode !== 0) {
|
||||
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;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
<div>
|
||||
<button wire:click='checkUpdate'>Updates</button>
|
||||
@env('production')
|
||||
<button wire:click='forceUpgrade'>Force Upgrade</button>
|
||||
@endenv
|
||||
@if (auth()->user()->teams->contains(0))
|
||||
<button wire:click='forceUpgrade'>Force Upgrade</button>
|
||||
@endif
|
||||
{{ $updateAvailable ? 'Update available' : 'No updates' }}
|
||||
</div>
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
## 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…
Reference in New Issue
Block a user