fix: installDocker id not found
This commit is contained in:
		@@ -8,7 +8,7 @@ use App\Models\Team;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
class InstallDocker
 | 
					class InstallDocker
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    public function __invoke(Server $server, Team $team)
 | 
					    public function __invoke(Server $server)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        $dockerVersion = '24.0';
 | 
					        $dockerVersion = '24.0';
 | 
				
			||||||
        $config = base64_encode('{
 | 
					        $config = base64_encode('{
 | 
				
			||||||
@@ -19,7 +19,7 @@ class InstallDocker
 | 
				
			|||||||
            }
 | 
					            }
 | 
				
			||||||
          }');
 | 
					          }');
 | 
				
			||||||
        $found = StandaloneDocker::where('server_id', $server->id);
 | 
					        $found = StandaloneDocker::where('server_id', $server->id);
 | 
				
			||||||
        if ($found->count() == 0) {
 | 
					        if ($found->count() == 0 && $server->id) {
 | 
				
			||||||
            StandaloneDocker::create([
 | 
					            StandaloneDocker::create([
 | 
				
			||||||
                'name' => 'coolify',
 | 
					                'name' => 'coolify',
 | 
				
			||||||
                'network' => 'coolify',
 | 
					                'network' => 'coolify',
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -232,7 +232,7 @@ uZx9iFkCELtxrh31QJ68AAAAEXNhaWxANzZmZjY2ZDJlMmRkAQIDBA==
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
    public function installDocker()
 | 
					    public function installDocker()
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        $activity = resolve(InstallDocker::class)($this->createdServer, currentTeam());
 | 
					        $activity = resolve(InstallDocker::class)($this->createdServer);
 | 
				
			||||||
        $this->emit('newMonitorActivity', $activity->id);
 | 
					        $this->emit('newMonitorActivity', $activity->id);
 | 
				
			||||||
        $this->currentState = 'select-proxy';
 | 
					        $this->currentState = 'select-proxy';
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -44,7 +44,7 @@ class Form extends Component
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    public function installDocker()
 | 
					    public function installDocker()
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        $activity = resolve(InstallDocker::class)($this->server, currentTeam());
 | 
					        $activity = resolve(InstallDocker::class)($this->server);
 | 
				
			||||||
        $this->emit('newMonitorActivity', $activity->id);
 | 
					        $this->emit('newMonitorActivity', $activity->id);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user