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(deployment): add COOLIFY_* environment variables to Nixpacks build context for enhanced deployment configuration

Andras Bacsai49a294283626
diff --git a/app/Jobs/ApplicationDeploymentJob.php b/app/Jobs/ApplicationDeploymentJob.php
index a1a15eb40c..35e479ff41 100644
--- a/app/Jobs/ApplicationDeploymentJob.php
+++ b/app/Jobs/ApplicationDeploymentJob.php
@@ -1600,6 +1600,12 @@ class ApplicationDeploymentJob implements ShouldBeEncrypted, ShouldQueue
}
}
+ // Add COOLIFY_* environment variables to Nixpacks build context
+ $coolify_envs = $this->generate_coolify_env_variables();
+ $coolify_envs->each(function ($value, $key) {
+ $this->env_nixpacks_args->push("--env {$key}={$value}");
+ });
+
$this->env_nixpacks_args = $this->env_nixpacks_args->implode(' ');
}