From 972223f01bdc6a6fc2fa8c2b3389fc965f5ce19f Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Thu, 12 Oct 2023 09:30:27 +0200 Subject: [PATCH] disable docker_compose deployments --- app/Jobs/ApplicationDeploymentJob.php | 69 ++++++++++++++------------- 1 file changed, 35 insertions(+), 34 deletions(-) diff --git a/app/Jobs/ApplicationDeploymentJob.php b/app/Jobs/ApplicationDeploymentJob.php index 33324620a..2993a4630 100644 --- a/app/Jobs/ApplicationDeploymentJob.php +++ b/app/Jobs/ApplicationDeploymentJob.php @@ -184,41 +184,42 @@ class ApplicationDeploymentJob implements ShouldQueue, ShouldBeEncrypted } } - private function deploy_docker_compose() - { - $dockercompose_base64 = base64_encode($this->application->dockercompose); - $this->execute_remote_command( - [ - "echo 'Starting deployment of {$this->application->name}.'" - ], - ); - $this->prepare_builder_image(); - $this->execute_remote_command( - [ - executeInDocker($this->deployment_uuid, "echo '$dockercompose_base64' | base64 -d > $this->workdir/docker-compose.yaml") - ], - ); - $this->build_image_name = Str::lower("{$this->application->git_repository}:build"); - $this->production_image_name = Str::lower("{$this->application->uuid}:latest"); - $this->save_environment_variables(); - $containers = getCurrentApplicationContainerStatus($this->application->destination->server, $this->application->id); - if ($containers->count() > 0) { - foreach ($containers as $container) { - $containerName = data_get($container, 'Names'); - if ($containerName) { - instant_remote_process( - ["docker rm -f {$containerName}"], - $this->application->destination->server - ); - } - } - } + // private function deploy_docker_compose() + // { + // $dockercompose_base64 = base64_encode($this->application->dockercompose); + // $this->execute_remote_command( + // [ + // "echo 'Starting deployment of {$this->application->name}.'" + // ], + // ); + // $this->prepare_builder_image(); + // $this->execute_remote_command( + // [ + // executeInDocker($this->deployment_uuid, "echo '$dockercompose_base64' | base64 -d > $this->workdir/docker-compose.yaml") + // ], + // ); + // $this->build_image_name = Str::lower("{$this->application->git_repository}:build"); + // $this->production_image_name = Str::lower("{$this->application->uuid}:latest"); + // $this->save_environment_variables(); + // $containers = getCurrentApplicationContainerStatus($this->application->destination->server, $this->application->id); + // ray($containers); + // if ($containers->count() > 0) { + // foreach ($containers as $container) { + // $containerName = data_get($container, 'Names'); + // if ($containerName) { + // instant_remote_process( + // ["docker rm -f {$containerName}"], + // $this->application->destination->server + // ); + // } + // } + // } - $this->execute_remote_command( - ["echo -n 'Starting services (could take a while)...'"], - [executeInDocker($this->deployment_uuid, "docker compose --project-directory {$this->workdir} up -d"), "hidden" => true], - ); - } + // $this->execute_remote_command( + // ["echo -n 'Starting services (could take a while)...'"], + // [executeInDocker($this->deployment_uuid, "docker compose --project-directory {$this->workdir} up -d"), "hidden" => true], + // ); + // } private function save_environment_variables() { $envs = collect([]);