mirror of
https://github.com/tiennm99/coolify.git
synced 2026-09-04 08:19:22 +00:00
feat(railpack): add buildpack control var filtering and dev seeder
Extract NIXPACKS_/RAILPACK_ prefix filtering into a reusable `scopeWithoutBuildpackControlVariables` query scope on EnvironmentVariable. Apply scope consistently to runtime vars, runtime preview vars, and buildtime var generation in ApplicationDeploymentJob. Refactor `generate_railpack_env_variables` to return a Collection. Add `RAILPACK_FRONTEND_IMAGE` constant and bake it into the coolify-helper Dockerfile as a build arg. Add DevelopmentRailpackExamplesSeeder (dev/local env only) for seeding example Railpack apps, wired into DatabaseSeeder. Add tests: - ApplicationDeploymentControlVarFilteringTest: verifies control vars are excluded from runtime and buildtime envs - DevelopmentRailpackExamplesSeederTest: verifies seeder behavior - ApplicationDeploymentRailpackEnvParityTest: parity checks for env handling across build/runtime paths
This commit is contained in:
@@ -960,8 +960,7 @@ class Application extends BaseModel
|
||||
{
|
||||
return $this->morphMany(EnvironmentVariable::class, 'resourceable')
|
||||
->where('is_preview', false)
|
||||
->where('key', 'not like', 'NIXPACKS_%')
|
||||
->where('key', 'not like', 'RAILPACK_%');
|
||||
->withoutBuildpackControlVariables();
|
||||
}
|
||||
|
||||
public function nixpacks_environment_variables()
|
||||
@@ -996,8 +995,7 @@ class Application extends BaseModel
|
||||
{
|
||||
return $this->morphMany(EnvironmentVariable::class, 'resourceable')
|
||||
->where('is_preview', true)
|
||||
->where('key', 'not like', 'NIXPACKS_%')
|
||||
->where('key', 'not like', 'RAILPACK_%');
|
||||
->withoutBuildpackControlVariables();
|
||||
}
|
||||
|
||||
public function nixpacks_environment_variables_preview()
|
||||
|
||||
Reference in New Issue
Block a user