From 529dc0f7b024df724e7c4490e39a95782f12e3ad Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Wed, 14 Aug 2024 10:47:06 +0200 Subject: [PATCH] revert the last commit lol --- app/Livewire/Project/New/DockerCompose.php | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/app/Livewire/Project/New/DockerCompose.php b/app/Livewire/Project/New/DockerCompose.php index 5dc085579..633ce5bda 100644 --- a/app/Livewire/Project/New/DockerCompose.php +++ b/app/Livewire/Project/New/DockerCompose.php @@ -5,8 +5,6 @@ namespace App\Livewire\Project\New; use App\Models\EnvironmentVariable; use App\Models\Project; use App\Models\Service; -use App\Models\StandaloneDocker; -use App\Models\SwarmDocker; use Illuminate\Support\Str; use Livewire\Component; use Symfony\Component\Yaml\Yaml; @@ -60,21 +58,11 @@ class DockerCompose extends Component $project = Project::where('uuid', $this->parameters['project_uuid'])->first(); $environment = $project->load(['environments'])->environments->where('name', $this->parameters['environment_name'])->first(); - $destination_uuid = $this->query['destination']; - $destination = StandaloneDocker::where('uuid', $destination_uuid)->first(); - if (! $destination) { - $destination = SwarmDocker::where('uuid', $destination_uuid)->first(); - } - if (! $destination) { - throw new \Exception('Destination not found. What?!'); - } $service = Service::create([ 'name' => 'service'.Str::random(10), 'docker_compose_raw' => $this->dockerComposeRaw, 'environment_id' => $environment->id, 'server_id' => (int) $server_id, - 'destination_id' => $destination->id, - 'destination_type' => $destination->getMorphClass(), ]); $variables = parseEnvFormatToArray($this->envFile); foreach ($variables as $key => $variable) {