feat(api): add api to create custom services

Add separate API to create services with custom Docker compose instead
of oneclick services implement as a POST to /services/compose.
This is somewhat similar to /applications/dockercompose but that API is
the only one in ApplicationsController that actually works with the `Service` model.
This commit is contained in:
Meghea Iulian
2025-03-14 16:26:48 +02:00
parent 956bbed5e3
commit 5a7ced9438
2 changed files with 185 additions and 0 deletions

View File

@@ -114,6 +114,7 @@ Route::group([
Route::get('/services', [ServicesController::class, 'services'])->middleware(['api.ability:read']);
Route::post('/services', [ServicesController::class, 'create_service'])->middleware(['api.ability:write']);
Route::post('/services/compose', [ServicesController::class, 'compose_service'])->middleware(['api.ability:write']);
Route::get('/services/{uuid}', [ServicesController::class, 'service_by_uuid'])->middleware(['api.ability:read']);
// Route::patch('/services/{uuid}', [ServicesController::class, 'update_by_uuid'])->middleware(['ability:write']);