Merge pull request #5487 from Messanga11/features/app-deployments
Features/app deployments
This commit is contained in:
52
CHANGELOG.md
52
CHANGELOG.md
@@ -4,6 +4,54 @@ 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
|
||||
|
||||
### 🚜 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
|
||||
@@ -159,12 +207,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 +227,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
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ namespace App\Http\Controllers\Api;
|
||||
use App\Actions\Database\StartDatabase;
|
||||
use App\Actions\Service\StartService;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\Application;
|
||||
use App\Models\ApplicationDeploymentQueue;
|
||||
use App\Models\Server;
|
||||
use App\Models\Tag;
|
||||
@@ -314,4 +315,68 @@ 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::ownedByCurrentTeamAPI($teamId)->where('uuid', $app_uuid)->first();
|
||||
|
||||
if (is_null($application)) {
|
||||
return response()->json(['message' => 'Application not found'], 404);
|
||||
}
|
||||
$deployments = $application->deployments($skip, $take);
|
||||
|
||||
return response()->json($deployments);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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']);
|
||||
|
||||
Reference in New Issue
Block a user