From 4dc46b45b9b8562772b33bf06561b83aa7505380 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 27 Mar 2025 09:37:59 +0000 Subject: [PATCH 1/4] docs: update changelog --- CHANGELOG.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c16c8a3e..20c416b02 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,25 @@ All notable changes to this project will be documented in this file. ### 🚀 Features +- *(database)* Disable MongoDB SSL by default in migration + +### 🚜 Refactor + +- *(proxy)* Improve port availability checks with multiple methods +- *(database)* Update MongoDB SSL configuration for improved security +- *(database)* Enhance SSL configuration handling for various databases +- *(notifications)* Update Telegram button URL for staging environment +- *(models)* Remove unnecessary cloud check in isEnabled method +- *(database)* Streamline event listeners in Redis General component +- *(database)* Remove redundant database status display in MongoDB view +- *(database)* Update import statements for Auth in database components +- *(database)* Require PEM key file for SSL certificate regeneration +- *(database)* Change MySQL daemon command to MariaDB daemon + +## [4.0.0-beta.399] - 2025-03-25 + +### 🚀 Features + - *(service)* Neon - *(migration)* Add `ssl_certificates` table and model - *(migration)* Add ssl setting to `standalone_postgresqls` table @@ -159,12 +178,15 @@ All notable changes to this project will be documented in this file. - *(invite-link)* Adjust layout for better responsiveness in form - *(invite-link)* Enhance form layout for improved responsiveness - *(network)* Enhance docker network creation with ipv6 fallback +- *(network)* Check for existing coolify network before creation +- *(database)* Enhance encryption process for local file volumes ### 📚 Documentation - Update changelog - Update changelog - *(CONTRIBUTING)* Add note about Laravel Horizon accessibility +- Update changelog ### ⚙️ Miscellaneous Tasks @@ -176,6 +198,7 @@ All notable changes to this project will be documented in this file. - *(ui)* Improve valid until handling - Improve code quality suggested by code rabbit - *(supabase)* Update Supabase service template and Postgres image version +- *(versions)* Update version numbers for coolify and nightly ## [4.0.0-beta.398] - 2025-03-01 From d71b669cb8a89b72d055c62373ebb20657d1f26c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 28 Mar 2025 21:19:02 +0000 Subject: [PATCH 2/4] docs: update changelog --- CHANGELOG.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 20c416b02..e4e773f22 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,35 @@ All notable changes to this project will be documented in this file. ## [unreleased] +### 🐛 Bug Fixes + +- *(file-storage)* Double save on compose volumes + +### 🚜 Refactor + +- *(nightly)* Update version numbers and enhance upgrade script +- *(versions)* Update version numbers for coolify and nightly +- *(email)* Validate team membership for email recipients +- *(shared)* Simplify deployment status check logic +- *(shared)* Add logging for running deployment jobs +- *(shared)* Enhance job status check to include 'reserved' +- *(email)* Improve error handling by passing context to handleError +- *(email)* Streamline email sending logic and improve configuration handling +- *(email)* Remove unnecessary whitespace in email sending logic +- *(email)* Allow custom email recipients in email sending logic +- *(email)* Enhance sender information formatting in email logic +- *(proxy)* Remove redundant stop call in restart method +- *(file-storage)* Add loadStorageOnServer method for improved error handling +- *(docker)* Parse and sanitize YAML compose file before encoding +- *(file-storage)* Improve layout and structure of input fields +- *(email)* Update label for test email recipient input + +### 📚 Documentation + +- Update changelog + +## [4.0.0-beta.400] - 2025-03-27 + ### 🚀 Features - *(database)* Disable MongoDB SSL by default in migration From 3b04d3df9196f4030518b317c20d045b8aaa7e4f Mon Sep 17 00:00:00 2001 From: __m__ Date: Mon, 31 Mar 2025 12:31:17 +0100 Subject: [PATCH 3/4] feat(deployments): add list application deployments api route --- app/Http/Controllers/Api/DeployController.php | 71 +++++++++++++++++++ routes/api.php | 1 + 2 files changed, 72 insertions(+) diff --git a/app/Http/Controllers/Api/DeployController.php b/app/Http/Controllers/Api/DeployController.php index 73b452f86..4bb7dedbd 100644 --- a/app/Http/Controllers/Api/DeployController.php +++ b/app/Http/Controllers/Api/DeployController.php @@ -6,6 +6,7 @@ use App\Actions\Database\StartDatabase; use App\Actions\Service\StartService; use App\Http\Controllers\Controller; use App\Models\ApplicationDeploymentQueue; +use App\Models\Application; use App\Models\Server; use App\Models\Tag; use Illuminate\Http\Request; @@ -314,4 +315,74 @@ class DeployController extends Controller return ['message' => $message, 'deployment_uuid' => $deployment_uuid]; } + + #[OA\Get( + summary: 'List application deployments', + description: 'List application deployments by using the app uuid', + path: '/deployments/applications/{uuid}', + operationId: 'list-deployments', + security: [ + ['bearerAuth' => []], + ], + tags: ['Deployments'], + responses: [ + new OA\Response( + response: 200, + description: 'List application deployments by using the app uuid.', + content: [ + + new OA\MediaType( + mediaType: 'application/json', + schema: new OA\Schema( + type: 'array', + items: new OA\Items(ref: '#/components/schemas/Application'), + ) + ), + ]), + new OA\Response( + response: 401, + ref: '#/components/responses/401', + ), + new OA\Response( + response: 400, + ref: '#/components/responses/400', + ), + ] + )] + public function get_application_deployments(Request $request) + { + $request->validate([ + 'skip' => ['nullable', 'integer', 'min:0'], + 'take' => ['nullable', 'integer', 'min:1'], + ]); + + $app_uuid = $request->route('uuid', null); + $skip = $request->get('skip', 0); + $take = $request->get('take', 10); + + $teamId = getTeamIdFromToken(); + if (is_null($teamId)) { + return invalidTokenResponse(); + } + $servers = Server::whereTeamId($teamId)->get(); + + if (is_null($app_uuid)) { + return response()->json(['message' => 'Application uuid is required'], 400); + } + + $application = Application::where('uuid', $app_uuid)->first(); + + if (is_null($application)) { + return response()->json(['message' => 'Application not found'], 404); + } + + $team = $application->team(); + if ($team->id != $teamId) { + return response()->json(['message' => 'Application not found'], 404); + } + + $deployments = $application->deployments($skip, $take); + + return response()->json($deployments); + } } diff --git a/routes/api.php b/routes/api.php index d2aa0a5b7..b65e59e8b 100644 --- a/routes/api.php +++ b/routes/api.php @@ -56,6 +56,7 @@ Route::group([ Route::match(['get', 'post'], '/deploy', [DeployController::class, 'deploy'])->middleware(['api.ability:write,deploy']); Route::get('/deployments', [DeployController::class, 'deployments'])->middleware(['api.ability:read']); Route::get('/deployments/{uuid}', [DeployController::class, 'deployment_by_uuid'])->middleware(['api.ability:read']); + Route::get('/deployments/applications/{uuid}', [DeployController::class, 'get_application_deployments'])->middleware(['api.ability:read']); Route::get('/servers', [ServersController::class, 'servers'])->middleware(['api.ability:read']); Route::get('/servers/{uuid}', [ServersController::class, 'server_by_uuid'])->middleware(['api.ability:read']); From adc3d952544e7e602c18adbcce1b76dc18f0e51b Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Mon, 31 Mar 2025 16:52:51 +0200 Subject: [PATCH 4/4] fix: only get apps for the current team --- app/Http/Controllers/Api/DeployController.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/app/Http/Controllers/Api/DeployController.php b/app/Http/Controllers/Api/DeployController.php index 4bb7dedbd..870f7fdce 100644 --- a/app/Http/Controllers/Api/DeployController.php +++ b/app/Http/Controllers/Api/DeployController.php @@ -5,8 +5,8 @@ namespace App\Http\Controllers\Api; use App\Actions\Database\StartDatabase; use App\Actions\Service\StartService; use App\Http\Controllers\Controller; -use App\Models\ApplicationDeploymentQueue; use App\Models\Application; +use App\Models\ApplicationDeploymentQueue; use App\Models\Server; use App\Models\Tag; use Illuminate\Http\Request; @@ -370,17 +370,11 @@ class DeployController extends Controller return response()->json(['message' => 'Application uuid is required'], 400); } - $application = Application::where('uuid', $app_uuid)->first(); + $application = Application::ownedByCurrentTeamAPI($teamId)->where('uuid', $app_uuid)->first(); if (is_null($application)) { return response()->json(['message' => 'Application not found'], 404); } - - $team = $application->team(); - if ($team->id != $teamId) { - return response()->json(['message' => 'Application not found'], 404); - } - $deployments = $application->deployments($skip, $take); return response()->json($deployments);