mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-14 04:15:55 +00:00
fix(deployment): filter null and empty environment variables from nixpacks plan
When application->fqdn is null, COOLIFY_FQDN and COOLIFY_URL are set to null. These null values cause nixpacks to fail parsing the config with "invalid type: null, expected a string". Filter out null and empty string values when generating environment variables for the nixpacks plan JSON. Fixes #6830.
This commit is contained in:
1 parent
eb96c9550b
commit
a7f491170a
4 files changed
+94
-2
No files matched your search
@@ -2196,7 +2196,7 @@ class ApplicationDeploymentJob implements ShouldBeEncrypted, ShouldQueue
|
||||
$this->create_workdir();
|
||||
$this->execute_remote_command(
|
||||
[
|
||||
executeInDocker($this->deployment_uuid, "cd {$this->workdir} && git log -1 ".escapeshellarg($this->commit)." --pretty=%B"),
|
||||
executeInDocker($this->deployment_uuid, "cd {$this->workdir} && git log -1 ".escapeshellarg($this->commit).' --pretty=%B'),
|
||||
'hidden' => true,
|
||||
'save' => 'commit_message',
|
||||
]
|
||||
@@ -2462,7 +2462,9 @@ class ApplicationDeploymentJob implements ShouldBeEncrypted, ShouldQueue
|
||||
|
||||
$coolify_envs = $this->generate_coolify_env_variables(forBuildTime: true);
|
||||
$coolify_envs->each(function ($value, $key) {
|
||||
$this->env_args->put($key, $value);
|
||||
if (! is_null($value) && $value !== '') {
|
||||
$this->env_args->put($key, $value);
|
||||
}
|
||||
});
|
||||
|
||||
// For build process, include only environment variables where is_buildtime = true
|
||||
|
||||
Reference in new issue
Block a user