fix(compose): clean domain labels across services

This commit is contained in:
Vyacheslav Scherbinin
2026-08-11 11:16:44 +07:00
parent f14f12c778
commit 67fa8e4104
2 changed files with 64 additions and 18 deletions
+15 -18
View File
@@ -224,24 +224,21 @@ export const addDomainToCompose = async (
result = randomized;
}
for (const domain of domains.filter((d) => !d.enabled)) {
if (!domain.serviceName) continue;
const service = result.services?.[domain.serviceName];
if (!service) continue;
if (compose.composeType === "docker-compose") {
service.labels = removeDomainLabels(
service.labels,
appName,
domain.uniqueConfigKey,
);
} else if (service.deploy) {
service.deploy.labels = removeDomainLabels(
service.deploy.labels,
appName,
domain.uniqueConfigKey,
);
for (const domain of domains) {
for (const service of Object.values(result.services ?? {})) {
if (compose.composeType === "docker-compose") {
service.labels = removeDomainLabels(
service.labels,
appName,
domain.uniqueConfigKey,
);
} else if (service.deploy) {
service.deploy.labels = removeDomainLabels(
service.deploy.labels,
appName,
domain.uniqueConfigKey,
);
}
}
}