From 997017365243a7e14e6e60f02f9684388ca88f6b Mon Sep 17 00:00:00 2001 From: Lucien Blunk-Lallet Date: Wed, 8 Jan 2025 09:02:13 +0100 Subject: [PATCH 1/2] fix: pull latest image from registry when using build server --- app/Jobs/ApplicationDeploymentJob.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Jobs/ApplicationDeploymentJob.php b/app/Jobs/ApplicationDeploymentJob.php index addaf436ae..ea672e1bce 100644 --- a/app/Jobs/ApplicationDeploymentJob.php +++ b/app/Jobs/ApplicationDeploymentJob.php @@ -2270,6 +2270,7 @@ private function start_by_compose_file() } else { if ($this->use_build_server) { $this->execute_remote_command( + ["{$this->coolify_variables} docker compose pull", 'hidden' => true], ["{$this->coolify_variables} docker compose --project-name {$this->application->uuid} --project-directory {$this->configuration_dir} -f {$this->configuration_dir}{$this->docker_compose_location} up --build -d", 'hidden' => true], ); } else { From a139cf154d2480d9c2fdb793d971ddfd283b67d6 Mon Sep 17 00:00:00 2001 From: Lucien Blunk-Lallet Date: Wed, 8 Jan 2025 09:37:25 +0100 Subject: [PATCH 2/2] refactor: use pull flag on docker compose up --- app/Jobs/ApplicationDeploymentJob.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/Jobs/ApplicationDeploymentJob.php b/app/Jobs/ApplicationDeploymentJob.php index ea672e1bce..8644cff836 100644 --- a/app/Jobs/ApplicationDeploymentJob.php +++ b/app/Jobs/ApplicationDeploymentJob.php @@ -2270,8 +2270,7 @@ private function start_by_compose_file() } else { if ($this->use_build_server) { $this->execute_remote_command( - ["{$this->coolify_variables} docker compose pull", 'hidden' => true], - ["{$this->coolify_variables} docker compose --project-name {$this->application->uuid} --project-directory {$this->configuration_dir} -f {$this->configuration_dir}{$this->docker_compose_location} up --build -d", 'hidden' => true], + ["{$this->coolify_variables} docker compose --project-name {$this->application->uuid} --project-directory {$this->configuration_dir} -f {$this->configuration_dir}{$this->docker_compose_location} up --pull always --build -d", 'hidden' => true], ); } else { $this->execute_remote_command(