fix(api): add custom labels generation for applications with readonly container label setting enabled

This commit is contained in:
Andras Bacsai
2025-08-31 15:40:48 +02:00
parent 88d33d177e
commit 6e3e80f1c2

View File

@@ -2284,6 +2284,9 @@ class ApplicationsController extends Controller
data_set($data, 'docker_compose_domains', json_encode($dockerComposeDomainsJson)); data_set($data, 'docker_compose_domains', json_encode($dockerComposeDomainsJson));
} }
$application->fill($data); $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(); $application->save();
if ($instantDeploy) { if ($instantDeploy) {