fix(api): add docker_cleanup parameter to stop endpoints (#8899)

This commit is contained in:
Andras Bacsai 2026-03-11 10:18:22 +01:00 committed by GitHub
commit eb96c9550b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 35 additions and 3 deletions

View file

@ -3670,6 +3670,15 @@ public function action_deploy(Request $request)
type: 'string',
)
),
new OA\Parameter(
name: 'docker_cleanup',
in: 'query',
description: 'Perform docker cleanup (prune networks, volumes, etc.).',
schema: new OA\Schema(
type: 'boolean',
default: true,
)
),
],
responses: [
new OA\Response(
@ -3718,7 +3727,8 @@ public function action_stop(Request $request)
$this->authorize('deploy', $application);
StopApplication::dispatch($application);
$dockerCleanup = $request->boolean('docker_cleanup', true);
StopApplication::dispatch($application, false, $dockerCleanup);
return response()->json(
[

View file

@ -2602,6 +2602,15 @@ public function action_deploy(Request $request)
type: 'string',
)
),
new OA\Parameter(
name: 'docker_cleanup',
in: 'query',
description: 'Perform docker cleanup (prune networks, volumes, etc.).',
schema: new OA\Schema(
type: 'boolean',
default: true,
)
),
],
responses: [
new OA\Response(
@ -2653,7 +2662,9 @@ public function action_stop(Request $request)
if (str($database->status)->contains('stopped') || str($database->status)->contains('exited')) {
return response()->json(['message' => 'Database is already stopped.'], 400);
}
StopDatabase::dispatch($database);
$dockerCleanup = $request->boolean('docker_cleanup', true);
StopDatabase::dispatch($database, $dockerCleanup);
return response()->json(
[

View file

@ -1676,6 +1676,15 @@ public function action_deploy(Request $request)
type: 'string',
)
),
new OA\Parameter(
name: 'docker_cleanup',
in: 'query',
description: 'Perform docker cleanup (prune networks, volumes, etc.).',
schema: new OA\Schema(
type: 'boolean',
default: true,
)
),
],
responses: [
new OA\Response(
@ -1727,7 +1736,9 @@ public function action_stop(Request $request)
if (str($service->status)->contains('stopped') || str($service->status)->contains('exited')) {
return response()->json(['message' => 'Service is already stopped.'], 400);
}
StopService::dispatch($service);
$dockerCleanup = $request->boolean('docker_cleanup', true);
StopService::dispatch($service, false, $dockerCleanup);
return response()->json(
[