fix
This commit is contained in:
parent
87fb4f9dd2
commit
3d8024b0d9
@ -3,10 +3,12 @@
|
||||
namespace App\Actions\Server;
|
||||
|
||||
use App\Models\Server;
|
||||
use App\Models\StandaloneDocker;
|
||||
use App\Models\Team;
|
||||
|
||||
class InstallDocker
|
||||
{
|
||||
public function __invoke(Server $server)
|
||||
public function __invoke(Server $server, Team $team)
|
||||
{
|
||||
$dockerVersion = '23.0';
|
||||
$config = base64_encode('{ "live-restore": true }');
|
||||
@ -23,8 +25,16 @@ public function __invoke(Server $server)
|
||||
"cat <<< $(jq -s '.[0] * .[1]' /etc/docker/daemon.json /etc/docker/daemon.json.coolify) > /etc/docker/daemon.json",
|
||||
"echo ####### Restarting Docker Engine...",
|
||||
"systemctl restart docker",
|
||||
"echo ####### Creating default network...",
|
||||
"docker network create --attachable coolify",
|
||||
"echo ####### Done!"
|
||||
], $server);
|
||||
StandaloneDocker::create([
|
||||
'name' => 'coolify',
|
||||
'network' => 'coolify',
|
||||
'server_id' => $server->id,
|
||||
'team_id' => $team->id
|
||||
]);
|
||||
|
||||
return $activity;
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ public function mount()
|
||||
}
|
||||
public function installDocker()
|
||||
{
|
||||
$activity = resolve(InstallDocker::class)($this->server);
|
||||
$activity = resolve(InstallDocker::class)($this->server, session('currentTeam'));
|
||||
$this->emit('newMonitorActivity', $activity->id);
|
||||
}
|
||||
public function validateServer()
|
||||
|
@ -1,3 +1,3 @@
|
||||
<?php
|
||||
|
||||
return '4.0.0-beta.6';
|
||||
return '4.0.0-beta.7';
|
||||
|
@ -14,7 +14,7 @@
|
||||
<button class="text-white btn-link">{{ data_get($docker, 'network') }} </button>
|
||||
</a>
|
||||
@empty
|
||||
<div class="">N\A</div>
|
||||
<div class="">N/A</div>
|
||||
@endforelse
|
||||
</div>
|
||||
<div class="grid gap-2 pt-2">
|
||||
|
@ -4,7 +4,7 @@
|
||||
"version": "3.12.32"
|
||||
},
|
||||
"v4": {
|
||||
"version": "4.0.0-beta.6"
|
||||
"version": "4.0.0-beta.7"
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user