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.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
refactor(deployment): streamline next deployment queuing logic by repositioning queue_next_deployment call
Andras Bacsaid10e4fa38824
diff --git a/app/Jobs/ApplicationDeploymentJob.php b/app/Jobs/ApplicationDeploymentJob.phpindex 6059cb99a5..a1a15eb40c 100644--- a/app/Jobs/ApplicationDeploymentJob.php+++ b/app/Jobs/ApplicationDeploymentJob.php@@ -2457,8 +2457,6 @@ COPY ./nginx.conf /etc/nginx/conf.d/default.conf");private function next(string $status){- queue_next_deployment($this->application);-// Never allow changing status from FAILED or CANCELLED_BY_USER to anything elseif ($this->application_deployment_queue->status === ApplicationDeploymentStatus::FAILED->value) {$this->application->environment->project->team?->notify(new DeploymentFailed($this->application, $this->deployment_uuid, $this->preview));@@ -2473,6 +2471,8 @@ COPY ./nginx.conf /etc/nginx/conf.d/default.conf");'status' => $status,]);+ queue_next_deployment($this->application);+if ($status === ApplicationDeploymentStatus::FINISHED->value) {if (! $this->only_this_server) {$this->deploy_to_additional_destinations();diff --git a/bootstrap/helpers/applications.php b/bootstrap/helpers/applications.phpindex 6c4f8fd227..87c24dbc67 100644--- a/bootstrap/helpers/applications.php+++ b/bootstrap/helpers/applications.php@@ -108,7 +108,6 @@ function queue_next_deployment(Application $application)ApplicationDeploymentJob::dispatch(application_deployment_queue_id: $next_deployment->id,);- break;}}}@@ -158,7 +157,6 @@ function next_after_cancel(?Server $server = null)ApplicationDeploymentJob::dispatch(application_deployment_queue_id: $next->id,);- break;}}}