From 51bada187192d8a21aae7a7709bb0409da473ff1 Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Wed, 22 Oct 2025 08:29:16 +0200 Subject: [PATCH] Changes auto-committed by Conductor --- app/Models/Application.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/app/Models/Application.php b/app/Models/Application.php index 9554d71a7..99fbded86 100644 --- a/app/Models/Application.php +++ b/app/Models/Application.php @@ -1804,7 +1804,9 @@ public function getFilesFromServer(bool $isInit = false) public function parseHealthcheckFromDockerfile($dockerfile, bool $isInit = false) { $dockerfile = str($dockerfile)->trim()->explode("\n"); - if (str($dockerfile)->contains('HEALTHCHECK') && ($this->isHealthcheckDisabled() || $isInit)) { + $hasHealthcheck = str($dockerfile)->contains('HEALTHCHECK'); + + if ($hasHealthcheck && ($this->isHealthcheckDisabled() || $isInit)) { $healthcheckCommand = null; $lines = $dockerfile->toArray(); foreach ($lines as $line) { @@ -1845,6 +1847,14 @@ public function parseHealthcheckFromDockerfile($dockerfile, bool $isInit = false $this->save(); } } + } elseif (! $hasHealthcheck && $this->custom_healthcheck_found) { + // HEALTHCHECK was removed from Dockerfile, reset to defaults + $this->custom_healthcheck_found = false; + $this->health_check_interval = 5; + $this->health_check_timeout = 5; + $this->health_check_retries = 10; + $this->health_check_start_period = 5; + $this->save(); } }