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.

fix: healthy status

Andras Bacsai31e08a24c960
diff --git a/app/Jobs/ApplicationDeploymentJob.php b/app/Jobs/ApplicationDeploymentJob.php
index 1fe0d54a38..ea59138476 100644
--- a/app/Jobs/ApplicationDeploymentJob.php
+++ b/app/Jobs/ApplicationDeploymentJob.php
@@ -679,7 +679,7 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
"echo 'Attempt {$counter} of {$this->application->health_check_retries} | Healthcheck status: {$this->saved_outputs->get('health_check')}'"
],
);
- if (Str::of($this->saved_outputs->get('health_check'))->contains('healthy')) {
+ if (Str::of($this->saved_outputs->get('health_check'))->replace('"', '')->value() === 'healthy') {
$this->newVersionIsHealthy = true;
$this->application->update(['status' => 'running']);
$this->execute_remote_command(
@@ -689,6 +689,10 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
);
break;
}
+ if (Str::of($this->saved_outputs->get('health_check'))->replace('"', '')->value() === 'unhealthy') {
+ $this->newVersionIsHealthy = false;
+ break;
+ }
$counter++;
sleep($this->application->health_check_interval);
}