From 804c70b57529a7fa55771d9fba458008b22c8ea1 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Wed, 17 Jul 2024 07:58:45 +0200 Subject: [PATCH 1/4] chore: Update version to 4.0.0-beta.315 --- config/sentry.php | 2 +- config/version.php | 2 +- versions.json | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/sentry.php b/config/sentry.php index c4301f2b1..33c7a4795 100644 --- a/config/sentry.php +++ b/config/sentry.php @@ -7,7 +7,7 @@ // The release version of your application // Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD')) - 'release' => '4.0.0-beta.314', + 'release' => '4.0.0-beta.315', // When left empty or `null` the Laravel environment will be used 'environment' => config('app.env'), diff --git a/config/version.php b/config/version.php index ccda21c32..76a71a716 100644 --- a/config/version.php +++ b/config/version.php @@ -1,3 +1,3 @@ Date: Wed, 17 Jul 2024 07:59:06 +0200 Subject: [PATCH 2/4] revert: pull policy --- app/Actions/Service/StartService.php | 2 +- app/Actions/Shared/PullImage.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Actions/Service/StartService.php b/app/Actions/Service/StartService.php index b33a52748..4b6a25dcc 100644 --- a/app/Actions/Service/StartService.php +++ b/app/Actions/Service/StartService.php @@ -20,7 +20,7 @@ public function handle(Service $service) $commands[] = "docker network inspect $service->uuid >/dev/null 2>&1 || docker network create --attachable $service->uuid"; $commands[] = 'echo Starting service.'; $commands[] = "echo 'Pulling images.'"; - $commands[] = 'docker compose pull --policy always'; + $commands[] = 'docker compose pull'; $commands[] = "echo 'Starting containers.'"; $commands[] = 'docker compose up -d --remove-orphans --force-recreate --build'; $commands[] = "docker network connect $service->uuid coolify-proxy >/dev/null 2>&1 || true"; diff --git a/app/Actions/Shared/PullImage.php b/app/Actions/Shared/PullImage.php index d8d81d23b..4bd1cf453 100644 --- a/app/Actions/Shared/PullImage.php +++ b/app/Actions/Shared/PullImage.php @@ -15,7 +15,7 @@ public function handle(Service $resource) $commands[] = 'cd '.$resource->workdir(); $commands[] = "echo 'Saved configuration files to {$resource->workdir()}.'"; - $commands[] = 'docker compose pull --policy always'; + $commands[] = 'docker compose pull'; $server = data_get($resource, 'server'); From 23a1b1925f6d49e9028ca90d03ccf78d6d9d7a1d Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Wed, 17 Jul 2024 07:59:12 +0200 Subject: [PATCH 3/4] fix: tag deployments --- app/Livewire/Tags/Index.php | 6 +++--- app/Livewire/Tags/Show.php | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/Livewire/Tags/Index.php b/app/Livewire/Tags/Index.php index 91e15835f..2e3fbd8e0 100644 --- a/app/Livewire/Tags/Index.php +++ b/app/Livewire/Tags/Index.php @@ -2,7 +2,7 @@ namespace App\Livewire\Tags; -use App\Http\Controllers\Api\Deploy; +use App\Http\Controllers\Api\DeployController; use App\Models\Tag; use Illuminate\Support\Collection; use Livewire\Attributes\Url; @@ -51,11 +51,11 @@ public function redeploy_all() { try { $this->applications->each(function ($resource) { - $deploy = new Deploy(); + $deploy = new DeployController(); $deploy->deploy_resource($resource); }); $this->services->each(function ($resource) { - $deploy = new Deploy(); + $deploy = new DeployController(); $deploy->deploy_resource($resource); }); $this->dispatch('success', 'Mass deployment started.'); diff --git a/app/Livewire/Tags/Show.php b/app/Livewire/Tags/Show.php index f4ecc67a0..ccd190c16 100644 --- a/app/Livewire/Tags/Show.php +++ b/app/Livewire/Tags/Show.php @@ -2,7 +2,7 @@ namespace App\Livewire\Tags; -use App\Http\Controllers\Api\Deploy; +use App\Http\Controllers\Api\DeployController; use App\Models\ApplicationDeploymentQueue; use App\Models\Tag; use Livewire\Component; @@ -59,11 +59,11 @@ public function redeploy_all() try { $message = collect([]); $this->applications->each(function ($resource) use ($message) { - $deploy = new Deploy(); + $deploy = new DeployController(); $message->push($deploy->deploy_resource($resource)); }); $this->services->each(function ($resource) use ($message) { - $deploy = new Deploy(); + $deploy = new DeployController(); $message->push($deploy->deploy_resource($resource)); }); $this->dispatch('success', 'Mass deployment started.'); From 19cfe4e51455d1097ca56824ab14968fe79cf4a3 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Wed, 17 Jul 2024 08:09:33 +0200 Subject: [PATCH 4/4] fix: new docker compose parsing --- bootstrap/helpers/shared.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/bootstrap/helpers/shared.php b/bootstrap/helpers/shared.php index 4480c65f4..e3c8d5218 100644 --- a/bootstrap/helpers/shared.php +++ b/bootstrap/helpers/shared.php @@ -1688,7 +1688,7 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = fal $read_only = data_get($volume, 'read_only'); if ($source && $target) { $uuid = $resource->uuid; - if ((str($source)->startsWith('.') || str($source)->startsWith('~'))) { + if ((str($source)->startsWith('.') || str($source)->startsWith('~') || str($source)->startsWith('/'))) { $dir = base_configuration_dir().'/applications/'.$resource->uuid; if (str($source, '.')) { $source = str($source)->replaceFirst('.', $dir); @@ -1696,11 +1696,6 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = fal if (str($source, '~')) { $source = str($source)->replaceFirst('~', $dir); } - if ($pull_request_id === 0) { - $source = $uuid."-$source"; - } else { - $source = $uuid."-$source-pr-$pull_request_id"; - } if ($read_only) { data_set($volume, 'source', $source.':'.$target.':ro'); } else {