From 0a6dab1f24b53f497d0914dd640ab3d3b09ed431 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Mon, 18 Mar 2024 12:40:58 +0100 Subject: [PATCH] fix: raw compose deployment --- app/Jobs/ApplicationDeploymentJob.php | 2 +- app/Models/Application.php | 2 +- bootstrap/helpers/shared.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Jobs/ApplicationDeploymentJob.php b/app/Jobs/ApplicationDeploymentJob.php index 3c6084fc2..1346a6ded 100644 --- a/app/Jobs/ApplicationDeploymentJob.php +++ b/app/Jobs/ApplicationDeploymentJob.php @@ -423,7 +423,7 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted if ($this->application->settings->is_raw_compose_deployment_enabled) { if ($this->docker_compose_custom_start_command) { $this->execute_remote_command( - ["cd {$this->basedir} && {$this->docker_compose_custom_start_command}", "hidden" => true], + [executeInDocker($this->deployment_uuid, "cd {$this->workdir} && {$this->docker_compose_custom_start_command}"), "hidden" => true], ); } else { $server_workdir = $this->application->workdir(); diff --git a/app/Models/Application.php b/app/Models/Application.php index 8fa4979d7..bc3b27bb0 100644 --- a/app/Models/Application.php +++ b/app/Models/Application.php @@ -752,7 +752,7 @@ class Application extends BaseModel $type = data_get_str($volume, 'type'); $source = data_get_str($volume, 'source'); } - if ($type->value() === 'bind') { + if ($type?->value() === 'bind') { if ($source->value() === "/var/run/docker.sock") { continue; } diff --git a/bootstrap/helpers/shared.php b/bootstrap/helpers/shared.php index 3b9f5df53..c9f98e48a 100644 --- a/bootstrap/helpers/shared.php +++ b/bootstrap/helpers/shared.php @@ -818,7 +818,7 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = fal $isDirectory = (bool) data_get($volume, 'isDirectory', false) || (bool) data_get($volume, 'is_directory', false); } } - if ($type->value() === 'bind') { + if ($type?->value() === 'bind') { if ($source->value() === "/var/run/docker.sock") { return $volume; }