diff --git a/app/Jobs/ApplicationDeploymentJob.php b/app/Jobs/ApplicationDeploymentJob.php index aa68c20ad..2dafcee43 100644 --- a/app/Jobs/ApplicationDeploymentJob.php +++ b/app/Jobs/ApplicationDeploymentJob.php @@ -279,13 +279,13 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted } else { $this->write_deployment_configurations(); } - $this->execute_remote_command( - [ - "docker rm -f {$this->deployment_uuid} >/dev/null 2>&1", - "hidden" => true, - "ignore_errors" => true, - ] - ); + // $this->execute_remote_command( + // [ + // "docker rm -f {$this->deployment_uuid} >/dev/null 2>&1", + // "hidden" => true, + // "ignore_errors" => true, + // ] + // ); $this->execute_remote_command( [ "docker image prune -f >/dev/null 2>&1", @@ -1022,11 +1022,15 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted $this->env_nixpacks_args = collect([]); if ($this->pull_request_id === 0) { foreach ($this->application->nixpacks_environment_variables as $env) { - $this->env_nixpacks_args->push("--env {$env->key}={$env->real_value}"); + if (!is_null($env->real_value)) { + $this->env_nixpacks_args->push("--env {$env->key}={$env->real_value}"); + } } } else { foreach ($this->application->nixpacks_environment_variables_preview as $env) { - $this->env_nixpacks_args->push("--env {$env->key}={$env->real_value}"); + if (!is_null($env->real_value)) { + $this->env_nixpacks_args->push("--env {$env->key}={$env->real_value}"); + } } } @@ -1037,11 +1041,15 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted $this->env_args = collect([]); if ($this->pull_request_id === 0) { foreach ($this->application->build_environment_variables as $env) { - $this->env_args->put($env->key, $env->real_value); + if (!is_null($env->real_value)) { + $this->env_args->put($env->key, $env->real_value); + } } } else { foreach ($this->application->build_environment_variables_preview as $env) { - $this->env_args->put($env->key, $env->real_value); + if (!is_null($env->real_value)) { + $this->env_args->put($env->key, $env->real_value); + } } } $this->env_args->put('SOURCE_COMMIT', $this->commit);