feat(application): add default NIXPACKS_NODE_VERSION environment variable for Nixpacks applications
- Introduced logic to automatically create a default NIXPACKS_NODE_VERSION environment variable when an application uses the 'nixpacks' build pack. - Ensured the environment variable is configured with appropriate attributes for build-time usage.
This commit is contained in:
parent
239ecd4056
commit
17505aa03b
1 changed files with 15 additions and 0 deletions
|
|
@ -182,6 +182,21 @@ protected static function booted()
|
|||
]);
|
||||
$application->compose_parsing_version = self::$parserVersion;
|
||||
$application->save();
|
||||
|
||||
// Add default NIXPACKS_NODE_VERSION environment variable for Nixpacks applications
|
||||
if ($application->build_pack === 'nixpacks') {
|
||||
EnvironmentVariable::create([
|
||||
'key' => 'NIXPACKS_NODE_VERSION',
|
||||
'value' => '22',
|
||||
'is_multiline' => false,
|
||||
'is_literal' => false,
|
||||
'is_buildtime' => true,
|
||||
'is_runtime' => false,
|
||||
'is_preview' => false,
|
||||
'resourceable_type' => Application::class,
|
||||
'resourceable_id' => $application->id,
|
||||
]);
|
||||
}
|
||||
});
|
||||
static::forceDeleting(function ($application) {
|
||||
$application->update(['fqdn' => null]);
|
||||
|
|
|
|||
Loading…
Reference in a new issue