mirror of
https://github.com/coollabsio/coolify.git
synced 2026-03-11 08:55:47 +00:00
nixpacks env variables only during build
This commit is contained in:
parent
631b61e11c
commit
117ba360ac
2 changed files with 6 additions and 2 deletions
|
|
@ -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 default
|
||||
|
|
|
|||
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue