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
nixpacks env variables only during build
Andras Bacsai117ba360ac0d
diff --git a/app/Jobs/DeployApplicationJob.php b/app/Jobs/DeployApplicationJob.phpindex 9714834a7f..e6cfbe37d8 100644--- a/app/Jobs/DeployApplicationJob.php+++ b/app/Jobs/DeployApplicationJob.php@@ -243,7 +243,7 @@ COPY --from={$this->application->uuid}:{$this->git_commit}-build /app/{$this->ap{$environment_variables = collect();- foreach ($this->application->environment_variables as $env) {+ foreach ($this->application->runtime_environment_variables as $env) {$environment_variables->push("$env->key=$env->value");}// Add PORT if not exists, use the first port as defaultdiff --git a/app/Models/Application.php b/app/Models/Application.phpindex b782e7616d..7481747eb8 100644--- a/app/Models/Application.php+++ b/app/Models/Application.php@@ -78,9 +78,13 @@ class Application extends BaseModel{return $this->hasMany(EnvironmentVariable::class);}+ public function runtime_environment_variables(): HasMany+ {+ return $this->hasMany(EnvironmentVariable::class)->where('key', 'not like', 'NIXPACKS_%');+ }public function build_environment_variables(): HasMany{- return $this->hasMany(EnvironmentVariable::class)->where('is_build_time', true);+ return $this->hasMany(EnvironmentVariable::class)->where('is_build_time', true)->where('key', 'not like', 'NIXPACKS_%');}public function nixpacks_environment_variables(): HasMany{