From 67131152cc684657f16ae6a2182d2ff00b3b7b01 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Fri, 15 Dec 2023 10:37:45 +0100 Subject: [PATCH] fix: reset domains on compose file change --- app/Models/Application.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/Models/Application.php b/app/Models/Application.php index d3ddc4e43..ae78c6b40 100644 --- a/app/Models/Application.php +++ b/app/Models/Application.php @@ -966,6 +966,7 @@ class Application extends BaseModel function loadComposeFile($isInit = false) { $initialDockerComposeLocation = $this->docker_compose_location; + $initialDockerComposeRaw = $this->docker_compose_raw; // $initialDockerComposePrLocation = $this->docker_compose_pr_location; if ($this->build_pack === 'dockercompose') { if ($isInit && $this->docker_compose_raw) { @@ -1020,8 +1021,13 @@ class Application extends BaseModel "rm -rf /tmp/{$uuid}", ]); instant_remote_process($commands, $this->destination->server, false); + $parsedServices = $this->parseCompose(); + if (md5($this->docker_compose_raw) !== md5($initialDockerComposeRaw)) { + $this->docker_compose_domains = null; + $this->save(); + } return [ - 'parsedServices' => $this->parseCompose(), + 'parsedServices' => $parsedServices, 'initialDockerComposeLocation' => $this->docker_compose_location, 'initialDockerComposePrLocation' => $this->docker_compose_pr_location, ];