icebear0828 Claude Opus 4.6 commited on
Commit
365573c
·
1 Parent(s): 7279f44

fix: lock container PORT=8080, revert HEALTHCHECK to hardcoded port

Browse files

Container-internal PORT is now fixed at 8080 via docker-compose
environment (overrides env_file). .env PORT only controls host-side
port mapping. HEALTHCHECK reverted to hardcoded 8080 for clarity.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Files changed (3) hide show
  1. CHANGELOG.md +1 -1
  2. Dockerfile +1 -1
  3. docker-compose.yml +1 -0
CHANGELOG.md CHANGED
@@ -8,7 +8,7 @@
8
 
9
  ### Fixed
10
 
11
- - Dockerfile HEALTHCHECK 端口改为 `${PORT:-8080}`,修复自定义 PORT 时健康检查永远失败导致容器重启循环的问题 (#40)
12
  - Docker Compose 暴露 OAuth 回调端口 1455,修复容器内登录时 "Operation timed out" 的问题
13
  - README Docker 快速开始补充 `cp .env.example .env` 步骤,修复新用户因缺少 `.env` 文件导致 `docker compose up -d` 启动失败的问题 (#38)
14
  - 识别 `response.output_item.done`、`response.incomplete`、`response.queued` Codex SSE 事件,消除 "Unknown event" 日志噪音
 
8
 
9
  ### Fixed
10
 
11
+ - Docker 端口修复:锁定容器内 `PORT=8080`(`environment` 覆盖 `env_file`)HEALTHCHECK 固定检查 8080,`.env` 的 PORT 仅控制宿主机暴露端口,修复自定义 PORT 时健康检查失败和端口映射不匹配的问题 (#40)
12
  - Docker Compose 暴露 OAuth 回调端口 1455,修复容器内登录时 "Operation timed out" 的问题
13
  - README Docker 快速开始补充 `cp .env.example .env` 步骤,修复新用户因缺少 `.env` 文件导致 `docker compose up -d` 启动失败的问题 (#38)
14
  - 识别 `response.output_item.done`、`response.incomplete`、`response.queued` Codex SSE 事件,消除 "Unknown event" 日志噪音
Dockerfile CHANGED
@@ -40,7 +40,7 @@ COPY docker-entrypoint.sh /
40
  RUN chmod +x /docker-entrypoint.sh
41
 
42
  HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
43
- CMD curl -fs http://localhost:${PORT:-8080}/health || exit 1
44
 
45
  ENTRYPOINT ["/docker-entrypoint.sh"]
46
  CMD ["node", "dist/index.js"]
 
40
  RUN chmod +x /docker-entrypoint.sh
41
 
42
  HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
43
+ CMD curl -fs http://localhost:8080/health || exit 1
44
 
45
  ENTRYPOINT ["/docker-entrypoint.sh"]
46
  CMD ["node", "dist/index.js"]
docker-compose.yml CHANGED
@@ -14,3 +14,4 @@ services:
14
  - .env
15
  environment:
16
  - NODE_ENV=production
 
 
14
  - .env
15
  environment:
16
  - NODE_ENV=production
17
+ - PORT=8080