fix(upgrade): wait for new version before showing success

Expose the running Coolify version on /api/health and only treat an upgrade as complete once that version meets the target. Parse upgrade status in a shared service, start the update after the Livewire response, and keep polling when the instance is still on the old version.
This commit is contained in:
Andras Bacsai
2026-08-13 10:46:06 +02:00
parent 882e25e072
commit 6481ffffcf
6 changed files with 317 additions and 46 deletions
+9 -2
View File
@@ -292,13 +292,20 @@ class OtherController extends Controller
#[OA\Get(
summary: 'Healthcheck',
description: 'Healthcheck endpoint.',
description: 'Healthcheck endpoint. Includes the running Coolify version in the X-Coolify-Version header.',
path: '/health',
operationId: 'healthcheck',
responses: [
new OA\Response(
response: 200,
description: 'Healthcheck endpoint.',
headers: [
new OA\Header(
header: 'X-Coolify-Version',
description: 'Currently running Coolify version.',
schema: new OA\Schema(type: 'string', example: '4.3.1'),
),
],
content: new OA\MediaType(
mediaType: 'text/html',
schema: new OA\Schema(type: 'string'),
@@ -316,6 +323,6 @@ class OtherController extends Controller
)]
public function healthcheck(Request $request)
{
return 'OK';
return response('OK')->header('X-Coolify-Version', (string) config('constants.coolify.version'));
}
}