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)};