mirror of
https://github.com/coollabsio/coolify.git
synced 2026-11-06 13:10:37 -04:00
Merge remote-tracking branch 'origin/main' into release/v4.5
This commit is contained in:
@@ -44,6 +44,17 @@ class EnvironmentVariable extends BaseModel
|
||||
|
||||
public const BUILDPACK_CONTROL_VARIABLE_PREFIXES = ['NIXPACKS_', 'RAILPACK_'];
|
||||
|
||||
/**
|
||||
* Buildpack control variables that the built image reads when the container starts,
|
||||
* e.g. the Nixpacks PHP prestart script renders nginx.conf from NIXPACKS_PHP_ROOT_DIR.
|
||||
*/
|
||||
public const RUNTIME_BUILDPACK_CONTROL_VARIABLES = [
|
||||
'NIXPACKS_PHP_ROOT_DIR',
|
||||
'NIXPACKS_PHP_FALLBACK_PATH',
|
||||
'NIXPACKS_SPA_OUTPUT_DIR',
|
||||
'RAILPACK_SKIP_MIGRATIONS',
|
||||
];
|
||||
|
||||
protected $attributes = [
|
||||
'is_runtime' => true,
|
||||
'is_buildtime' => true,
|
||||
@@ -163,6 +174,14 @@ class EnvironmentVariable extends BaseModel
|
||||
return $query;
|
||||
}
|
||||
|
||||
public function scopeWithoutBuildOnlyBuildpackControlVariables(Builder $query): Builder
|
||||
{
|
||||
return $query->where(function (Builder $query) {
|
||||
$query->whereIn('key', self::RUNTIME_BUILDPACK_CONTROL_VARIABLES)
|
||||
->orWhere(fn (Builder $query) => $query->withoutBuildpackControlVariables());
|
||||
});
|
||||
}
|
||||
|
||||
public static function isBuildpackControlKey(?string $key): bool
|
||||
{
|
||||
if (blank($key)) {
|
||||
|
||||
Reference in New Issue
Block a user