From 4a64374bb348dda089d5896324b5dad33d520a88 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Thu, 29 Aug 2024 12:50:04 +0200 Subject: [PATCH] fix: preview fqdn generation --- app/Livewire/Project/Application/Previews.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/Livewire/Project/Application/Previews.php b/app/Livewire/Project/Application/Previews.php index 30bc0a9d1..317a2ae51 100644 --- a/app/Livewire/Project/Application/Previews.php +++ b/app/Livewire/Project/Application/Previews.php @@ -79,8 +79,15 @@ class Previews extends Component return; } - $fqdn = generateFqdn($this->application->destination->server, $this->application->uuid); + if ($this->application->build_pack === 'dockercompose') { + $preview->generate_preview_fqdn_compose(); + $this->application->refresh(); + $this->dispatch('success', 'Domain generated.'); + return; + } + + $fqdn = generateFqdn($this->application->destination->server, $this->application->uuid); $url = Url::fromString($fqdn); $template = $this->application->preview_url_template; $host = $url->getHost();