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 server readiness check and update version number

Andras Bacsaid38d50dca250
diff --git a/app/Jobs/ApplicationDeploymentJob.php b/app/Jobs/ApplicationDeploymentJob.php
index 4c04509203..4e4f663015 100644
--- a/app/Jobs/ApplicationDeploymentJob.php
+++ b/app/Jobs/ApplicationDeploymentJob.php
@@ -1022,10 +1022,6 @@ COPY ./nginx.conf /etc/nginx/conf.d/default.conf");
listen [::]:80;
server_name localhost;
- // real_ip_header X-Forwarded-For;
- // proxy_set_header X-Real-IP \$remote_addr;
- // proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
-
location / {
root /usr/share/nginx/html;
index index.html;
diff --git a/app/Jobs/ContainerStatusJob.php b/app/Jobs/ContainerStatusJob.php
index 20acb4bc41..dd7247c2b7 100644
--- a/app/Jobs/ContainerStatusJob.php
+++ b/app/Jobs/ContainerStatusJob.php
@@ -39,9 +39,6 @@ class ContainerStatusJob implements ShouldQueue, ShouldBeEncrypted
{
// ray("checking server status for {$this->server->id}");
try {
- if (!$this->server->checkServerRediness()) {
- return;
- }
$containers = instant_remote_process(["docker container ls -q"], $this->server);
if (!$containers) {
return;
diff --git a/app/Jobs/ServerStatusJob.php b/app/Jobs/ServerStatusJob.php
index 80ebf370ec..7d591bc831 100644
--- a/app/Jobs/ServerStatusJob.php
+++ b/app/Jobs/ServerStatusJob.php
@@ -34,10 +34,7 @@ class ServerStatusJob implements ShouldQueue, ShouldBeEncrypted
{
ray("checking server status for {$this->server->id}");
try {
- if (!$this->server->checkServerRediness()) {
- ray('server not ready');
- return;
- }
+ $this->server->checkServerRediness();
$this->cleanup(notify: false);
} catch (\Throwable $e) {
send_internal_notification('ServerStatusJob failed with: ' . $e->getMessage());
diff --git a/app/Models/Server.php b/app/Models/Server.php
index 9934b0620d..8cd4dc957e 100644
--- a/app/Models/Server.php
+++ b/app/Models/Server.php
@@ -130,9 +130,6 @@ class Server extends BaseModel
}
public function checkServerRediness()
{
- if ($this->skipServer()) {
- return false;
- }
$serverUptimeCheckNumber = $this->unreachable_count;
$serverUptimeCheckNumberMax = 5;
@@ -168,7 +165,7 @@ class Server extends BaseModel
$db->update(['status' => 'exited']);
}
}
- return false;
+ throw new \Exception('Server is not reachable.');
}
$result = $this->validateConnection();
ray('validateConnection: ' . $result);
diff --git a/config/sentry.php b/config/sentry.php
index bd908c4025..5655b866b6 100644
--- a/config/sentry.php
+++ b/config/sentry.php
@@ -7,7 +7,7 @@ return [
// The release version of your application
// Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD'))
- 'release' => '4.0.0-beta.141',
+ 'release' => '4.0.0-beta.142',
// When left empty or `null` the Laravel environment will be used
'environment' => config('app.env'),
diff --git a/config/version.php b/config/version.php
index 37f9d819e5..8b7d1633c6 100644
--- a/config/version.php
+++ b/config/version.php
@@ -1,3 +1,3 @@
<?php
-return '4.0.0-beta.141';
+return '4.0.0-beta.142';
diff --git a/versions.json b/versions.json
index 8adad1f5ae..9f58611b90 100644
--- a/versions.json
+++ b/versions.json
@@ -4,7 +4,7 @@
"version": "3.12.36"
},
"v4": {
- "version": "4.0.0-beta.141"
+ "version": "4.0.0-beta.142"
}
}
}