From e2578a7dd0c155f7c361a5287eeb2a45570fd99e Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Wed, 6 Dec 2023 09:36:11 +0100 Subject: [PATCH] fix: deploy the right compose file --- app/Jobs/ApplicationDeploymentJob.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/app/Jobs/ApplicationDeploymentJob.php b/app/Jobs/ApplicationDeploymentJob.php index 3b2313e19..0b7242377 100644 --- a/app/Jobs/ApplicationDeploymentJob.php +++ b/app/Jobs/ApplicationDeploymentJob.php @@ -1249,9 +1249,15 @@ private function start_by_compose_file() [executeInDocker($this->deployment_uuid, "docker compose --project-directory {$this->workdir} up --build -d"), "hidden" => true], ); } else { - $this->execute_remote_command( - [executeInDocker($this->deployment_uuid, "docker compose --project-directory {$this->workdir} up --build -d"), "hidden" => true], - ); + if ($this->docker_compose_location) { + $this->execute_remote_command( + [executeInDocker($this->deployment_uuid, "docker compose --project-directory {$this->workdir} -f {$this->workdir}{$this->docker_compose_location} up --build -d"), "hidden" => true], + ); + } else { + $this->execute_remote_command( + [executeInDocker($this->deployment_uuid, "docker compose --project-directory {$this->workdir} up --build -d"), "hidden" => true], + ); + } } $this->application_deployment_queue->addLogEntry("New container started."); }