fix(app-store): use stack name as compose service key (#704)

* fix(app-store): use stack name as compose service key

App Store deployments hardcoded the compose service to "app", so every
container's com.docker.compose.service label collapsed to "app". Global
logs and AutoHeal policies key off that label, making it impossible to
distinguish between deployed apps. Pass the already-validated stack
name through to generateComposeFromTemplate so each app gets a
descriptive service identifier.

* test(template-service): use {2} quantifier to satisfy no-regex-spaces

ESLint's no-regex-spaces rule flagged two consecutive spaces in the
regex literal as an error. Swap for the {2} quantifier to keep the
assertion identical while clearing the lint gate.

---------

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Anso
2026-04-20 07:57:16 -04:00
committed by GitHub
parent 370b67d7ec
commit 9f861e0072
3 changed files with 28 additions and 16 deletions
+2 -2
View File
@@ -288,8 +288,8 @@ export class TemplateService {
}
}
public generateComposeFromTemplate(template: Template): string {
let yaml = `services:\n app:\n`;
public generateComposeFromTemplate(template: Template, serviceName: string): string {
let yaml = `services:\n ${serviceName}:\n`;
if (template.image) {
yaml += ` image: ${template.image}\n`;