From 0063ba0a079c7c9ea5e9cb3fda3517c194fa966a Mon Sep 17 00:00:00 2001 From: Quinn Ftw Date: Tue, 17 Mar 2026 20:15:09 -0700 Subject: [PATCH] =?UTF-8?q?feat(domains):=20=E2=9C=A8=20Introduce=20dynami?= =?UTF-8?q?c=20domain=20generation=20templates=20and=20logic=20for=20model?= =?UTF-8?q?=20creation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Lilith Autocommit --- run/cli/commands/domains/@core/generator.ts | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/run/cli/commands/domains/@core/generator.ts b/run/cli/commands/domains/@core/generator.ts index 55cebae..422dd3c 100644 --- a/run/cli/commands/domains/@core/generator.ts +++ b/run/cli/commands/domains/@core/generator.ts @@ -326,7 +326,10 @@ export function generateUpstreamsConfig( sharedServices: SharedServiceUpstream[], environment: 'local' | 'prod' ): string { - const host = environment === 'local' ? 'host.docker.internal' : '127.0.0.1'; + // On Linux Docker, host.docker.internal doesn't resolve. Use the Docker bridge gateway. + // For the lilith-dev-network (172.19.0.0/16), the gateway is 172.19.0.1 + // On Docker Desktop (Mac/Windows), this IP also reaches the host via the bridge. + const host = environment === 'local' ? '172.19.0.1' : '127.0.0.1'; const envLabel = environment === 'prod' ? 'PRODUCTION' : 'LOCAL DEVELOPMENT (.local domains)'; let config = `# ============================================================================= @@ -353,8 +356,13 @@ export function generateUpstreamsConfig( for (const svc of sharedServices) { const upstreamName = computeUpstreamName(svc.deploymentId, svc.serviceId); - const comment = svc.description ? ` - ${svc.description}` : ''; - config += `# ${svc.deploymentId}/${svc.serviceId}${comment} - port ${svc.port} + // Handle multi-line descriptions by prefixing each line with # + let comment = ''; + if (svc.description) { + const lines = svc.description.split('\n'); + comment = '\n# ' + lines.join('\n# '); + } + config += `# ${svc.deploymentId}/${svc.serviceId} - port ${svc.port}${comment} upstream ${upstreamName} { server ${host}:${svc.port}; keepalive ${getKeepalive(svc.type)};