fix: resolve nginx shared memory error and missing join import#58
fix: resolve nginx shared memory error and missing join import#58dwgx merged 1 commit intodwgx:masterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes deployment-time container restart loops by addressing two startup errors: Nginx upstream DNS re-resolution requiring shared memory, and a missing join() import in the Node config.
Changes:
- Add an Nginx
zoneto theupstream windsurf_backendblock to enable runtime DNS resolution withresolve. - Import
joinfrompathinsrc/config.jsto preventReferenceError: join is not defined.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/config.js |
Adds missing join import used to build replica-isolated dataDir. |
nginx.conf |
Adds shared-memory zone required for server ... resolve in upstream. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # or we rely on ip_hash for generic load balancing if behind a single reverse proxy. | ||
| server windsurf-api:3003 resolve; | ||
| zone windsurf_backend_zone 64k; | ||
| server windsurf-api:3003 resolve; |
There was a problem hiding this comment.
The server windsurf-api:3003 resolve; line is indented with a tab while the rest of this file uses spaces. Please switch this to the same space indentation as surrounding directives to keep formatting consistent and avoid mixed whitespace in nginx.conf.
| server windsurf-api:3003 resolve; | |
| server windsurf-api:3003 resolve; |
|
谢谢你!! |
…ly-zhang to S+ - baily-zhang PR #61 (Opus 4.7 multimodal context bloat) — third major contribution after #36 and #45, now de-facto maintainer of the reuse-fingerprint / trajectory-offset machinery - abwuge PR #58 (docker/nginx deploy fix) — first-time contributor, +3/-2 surgical, unblocked the docker-compose Restart loop - aict666 PR #54 (tool preamble slimming + redact marker 6th-gen U+2026 ellipsis + identity coverage extension) — fourth major contribution - aict666 PR #53 (redact marker shell-safety regression) — second contribution, was missing from the prior credits update - baily-zhang upgraded from S to S+ (parity with aict666)
|
合了 部到 US 主 VPS 了 v2.0.4 + commit @abwuge 首次贡献就解了部署死锁 surgical 漂亮 +3 / -2 没多一行 dashboard credits 加上你了 B+ 级 后面如果有兴趣再玩玩 deploy 链或者 dashboard UI 随时来 |
The Pages site at dwgx.github.io/WindsurfAPI/ had only 4 names listed in the footer (dd373156, colin1112a, motto1, youfak). 8 contributors were missing from the public site even though most of them landed S+/S level fixes (aict666 #44/#51/#53/#54, baily-zhang #36/#45/#61, smeinecke #43, abwuge #58). Adds a dedicated `#contributors` section before the footer with one card per contributor: avatar, GitHub link, weight badge (S+/S/A+/A/B+), PR list, and a one-paragraph 繁體中文 description of what each fix actually solved. Cards reuse the existing panel-card warm/coral palette to fit the site's aesthetic. Footer one-liner is also expanded to all 8 names ordered by weight, with a "完整名單 ↑" anchor back to the new section. CSS additions: contrib-grid, contrib-card, contrib-avatar, contrib-weight + 5 weight-tier classes (-S-plus, -S, -A-plus, -A, -B-plus). All gradient/hover behaviour matches the existing panel-card styling.
baily-zhang's fourth landed PR (#36 / #45 / #61 / #62) — adding the PR #62 entry to the dashboard credits panel as a separate card so the inline-script regression-test win is visible alongside the cascade-reuse machinery work. v2.0.5 covers everything since 2.0.4: - aict666 #54 tool preamble slim + redact U+2026 - abwuge #58 docker/nginx deploy fix - baily #61 Opus 4.7 multimodal context bloat - baily #62 dashboard escape regression - own commits: empty-message validator, internal_error backoff, upstream_transient_error category, Opus 4.6 reuse widening, /v1/responses endpoint for Codex CLI compatibility (#56, #63)
改了什么 / What changed
nginx.conf的upstream windsurf_backend块中添加zone指令,分配共享内存区域src/config.js顶部补充import { join } from 'path';语句为什么 / Why
修复部署后所有 Windsurf 相关容器(
windsurf-lb和三个windsurfapi-windsurf-api副本)持续重启的问题。upstream中使用server … resolve动态解析后端地址时,Nginx 要求通过zone指令显式分配共享内存,否则报错resolving names at run time requires upstream … to be in shared memoryconfig.js中直接使用了join(),但未从path模块导入,导致ReferenceError: join is not defined,进程启动失败这么简单的问题,难道没人用docker吗?测试 / Testing
docker-compose up --build -d后所有容器状态正常,不再处于Restarting循环Checklist