mirror of
https://github.com/tiennm99/coolify.git
synced 2026-04-17 21:20:29 +00:00
fix(deployment): add warning for NIXPACKS_NODE_VERSION in node configurations
- Implemented a check for the NIXPACKS_NODE_VERSION variable in the ApplicationDeploymentJob. - Added log entries to notify users when NIXPACKS_NODE_VERSION is not set, indicating that Node.js 18 will be used by default, which is EOL. - Provided guidance on how to override the default version by setting NIXPACKS_NODE_VERSION in environment variables.
This commit is contained in:
@@ -1988,6 +1988,16 @@ class ApplicationDeploymentJob implements ShouldBeEncrypted, ShouldQueue
|
||||
if ($this->nixpacks_type === 'elixir') {
|
||||
$this->elixir_finetunes();
|
||||
}
|
||||
if ($this->nixpacks_type === 'node') {
|
||||
// Check if NIXPACKS_NODE_VERSION is set
|
||||
$variables = data_get($parsed, 'variables', []);
|
||||
if (! isset($variables['NIXPACKS_NODE_VERSION'])) {
|
||||
$this->application_deployment_queue->addLogEntry('----------------------------------------');
|
||||
$this->application_deployment_queue->addLogEntry('⚠️ NIXPACKS_NODE_VERSION not set. Nixpacks will use Node.js 18 by default, which is EOL.');
|
||||
$this->application_deployment_queue->addLogEntry('You can override this by setting NIXPACKS_NODE_VERSION=22 in your environment variables.');
|
||||
$this->application_deployment_queue->addLogEntry('----------------------------------------');
|
||||
}
|
||||
}
|
||||
$this->nixpacks_plan = json_encode($parsed, JSON_PRETTY_PRINT);
|
||||
$this->nixpacks_plan_json = collect($parsed);
|
||||
$this->application_deployment_queue->addLogEntry("Final Nixpacks plan: {$this->nixpacks_plan}", hidden: true);
|
||||
|
||||
Reference in New Issue
Block a user