From 6e3e80f1c20eca0df4c82a5558c30b5a262b2a2a Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Sun, 31 Aug 2025 15:40:48 +0200 Subject: [PATCH] fix(api): add custom labels generation for applications with readonly container label setting enabled --- app/Http/Controllers/Api/ApplicationsController.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/Http/Controllers/Api/ApplicationsController.php b/app/Http/Controllers/Api/ApplicationsController.php index 16413d2ad..7ef1c3506 100644 --- a/app/Http/Controllers/Api/ApplicationsController.php +++ b/app/Http/Controllers/Api/ApplicationsController.php @@ -2284,6 +2284,9 @@ class ApplicationsController extends Controller data_set($data, 'docker_compose_domains', json_encode($dockerComposeDomainsJson)); } $application->fill($data); + if ($application->settings->is_container_label_readonly_enabled && $requestHasDomains && $server->isProxyShouldRun()) { + $application->custom_labels = str(implode('|coolify|', generateLabelsApplication($application)))->replace('|coolify|', "\n"); + } $application->save(); if ($instantDeploy) {