From 4a66fdf75399a31930c96206b995cf9b52472c2d Mon Sep 17 00:00:00 2001 From: "sur.la.route" <17788706+christopherpickering@users.noreply.github.com> Date: Fri, 9 May 2025 07:07:02 -0500 Subject: [PATCH] fix(docker-compose build) added --no-cache flag added `--no-cache` flag when build is force. --- app/Jobs/ApplicationDeploymentJob.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/Jobs/ApplicationDeploymentJob.php b/app/Jobs/ApplicationDeploymentJob.php index bebec64cf..e237bca0e 100644 --- a/app/Jobs/ApplicationDeploymentJob.php +++ b/app/Jobs/ApplicationDeploymentJob.php @@ -507,7 +507,11 @@ class ApplicationDeploymentJob implements ShouldBeEncrypted, ShouldQueue if ($this->env_filename) { $command .= " --env-file {$this->workdir}/{$this->env_filename}"; } - $command .= " --project-name {$this->application->uuid} --project-directory {$this->workdir} -f {$this->workdir}{$this->docker_compose_location} build --pull"; + if ($this->force_rebuild) { + $command .= " --project-name {$this->application->uuid} --project-directory {$this->workdir} -f {$this->workdir}{$this->docker_compose_location} build --pull --no-cache"; + else + $command .= " --project-name {$this->application->uuid} --project-directory {$this->workdir} -f {$this->workdir}{$this->docker_compose_location} build --pull"; + } $this->execute_remote_command( [executeInDocker($this->deployment_uuid, $command), 'hidden' => true], );