Merge remote-tracking branch 'origin/main' into release/v4.5

This commit is contained in:
github-actions[bot]
2026-10-14 07:45:50 +00:00
4 changed files with 110 additions and 2 deletions
+19
View File
@@ -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)) {