fix: better way to add curl/wget to nixpacks
This commit is contained in:
@@ -1257,7 +1257,10 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
|
|||||||
// Do any modifications here
|
// Do any modifications here
|
||||||
$this->generate_env_variables();
|
$this->generate_env_variables();
|
||||||
$merged_envs = $this->env_args->merge(collect(data_get($parsed, 'variables', [])));
|
$merged_envs = $this->env_args->merge(collect(data_get($parsed, 'variables', [])));
|
||||||
$aptPkgs = data_get($parsed, 'phases.setup.aptPkgs');
|
$aptPkgs = data_get($parsed, 'phases.setup.aptPkgs', []);
|
||||||
|
if (count($aptPkgs) === 0) {
|
||||||
|
data_set($parsed, 'phases.setup.aptPkgs', ['curl', 'wget']);
|
||||||
|
} else {
|
||||||
if (!in_array('curl', $aptPkgs)) {
|
if (!in_array('curl', $aptPkgs)) {
|
||||||
$aptPkgs[] = 'curl';
|
$aptPkgs[] = 'curl';
|
||||||
}
|
}
|
||||||
@@ -1265,8 +1268,10 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted
|
|||||||
$aptPkgs[] = 'wget';
|
$aptPkgs[] = 'wget';
|
||||||
}
|
}
|
||||||
data_set($parsed, 'phases.setup.aptPkgs', $aptPkgs);
|
data_set($parsed, 'phases.setup.aptPkgs', $aptPkgs);
|
||||||
|
}
|
||||||
data_set($parsed, 'variables', $merged_envs->toArray());
|
data_set($parsed, 'variables', $merged_envs->toArray());
|
||||||
$this->nixpacks_plan = json_encode($parsed, JSON_PRETTY_PRINT);
|
$this->nixpacks_plan = json_encode($parsed, JSON_PRETTY_PRINT);
|
||||||
|
$this->application_deployment_queue->addLogEntry("Final Nixpacks plan: {$this->nixpacks_plan}", hidden: true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user