Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

Changes auto-committed by Conductor

Andras Bacsai51bada187192
diff --git a/app/Models/Application.php b/app/Models/Application.php
index 9554d71a7b..99fbded860 100644
--- a/app/Models/Application.php
+++ b/app/Models/Application.php
@@ -1804,7 +1804,9 @@ class Application extends BaseModel
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 @@ class Application extends BaseModel
$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();
}
}