Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ jobs:
fi

- name: Create summary
if: github.event_name == 'pull_request'
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
uses: actions/github-script@v7
with:
script: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,4 @@ tmp/
.trae/
.sisyphus
.ace-tool/
.worktrees/
16 changes: 8 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ COPY --from=deps /app/node_modules ./node_modules
COPY . .
ENV NEXT_TELEMETRY_DISABLED=1
ENV CI=true
RUN bun run build
RUN --mount=type=cache,target=/app/.next/cache bun run build

FROM node:20-slim AS runner
WORKDIR /app
ENV NODE_ENV=production
ENV PORT=8080
EXPOSE 8080
ENV PORT=3000
EXPOSE 3000
Comment on lines 12 to +19
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Runtime port mismatch

This Dockerfile changes ENV PORT/EXPOSE from 8080 to 3000, but the final command is node server.js from Next standalone output. If the generated server.js is configured to bind process.env.PORT (common) this is fine, but if any deployment still expects 8080 (e.g., existing infra / docs / helm values), this change will break connectivity. At minimum ensure the app actually listens on 3000 in standalone mode and update any references that still assume 8080.

Prompt To Fix With AI
This is a comment left during a code review.
Path: Dockerfile
Line: 12:19

Comment:
**Runtime port mismatch**

This Dockerfile changes `ENV PORT`/`EXPOSE` from `8080` to `3000`, but the final command is `node server.js` from Next standalone output. If the generated `server.js` is configured to bind `process.env.PORT` (common) this is fine, but if any deployment still expects `8080` (e.g., existing infra / docs / helm values), this change will break connectivity. At minimum ensure the app actually listens on 3000 in standalone mode and update any references that still assume 8080.

How can I resolve this? If you propose a fix, please make it concise.


# 关键:确保复制了所有必要的文件,特别是 drizzle 文件夹
COPY --from=builder /app/public ./public
COPY --from=builder /app/.next ./.next
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/package.json ./package.json
COPY --from=builder /app/drizzle ./drizzle
COPY --from=builder /app/.next/standalone ./
Comment on lines 21 to +23
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possible missing server.js

The runner stage copies /.next/standalone into ./ and then runs CMD ["node","server.js"]. This only works if server.js is actually present at the container workdir root after the copy. If Next’s standalone output layout changes or output: 'standalone' isn’t enabled in some build contexts, this will crash at runtime with Cannot find module '/app/server.js'. It would be safer to ensure the build always produces standalone output (and/or validate the file exists in CI) before switching the runtime command.

Prompt To Fix With AI
This is a comment left during a code review.
Path: Dockerfile
Line: 21:23

Comment:
**Possible missing `server.js`**

The runner stage copies `/.next/standalone` into `./` and then runs `CMD ["node","server.js"]`. This only works if `server.js` is actually present at the container workdir root after the copy. If Next’s standalone output layout changes or `output: 'standalone'` isn’t enabled in some build contexts, this will crash at runtime with `Cannot find module '/app/server.js'`. It would be safer to ensure the build always produces standalone output (and/or validate the file exists in CI) before switching the runtime command.

How can I resolve this? If you propose a fix, please make it concise.

COPY --from=builder /app/.next/static ./.next/static
COPY --from=builder /app/drizzle ./drizzle
COPY --from=builder /app/VERSION ./VERSION

CMD ["node", "node_modules/.bin/next", "start"]
CMD ["node", "server.js"]
8 changes: 7 additions & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,13 @@ services:
- "${APP_PORT:-23000}:3000"
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:3000/api/actions/health || exit 1"]
test:
[
"CMD",
"node",
"-e",
"fetch('http://' + (process.env.HOSTNAME || '127.0.0.1') + ':3000/api/actions/health').then((r)=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))",
]
Comment on lines 70 to +77
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Healthcheck uses missing node

The app service healthcheck runs node -e fetch(...), but the container image is ghcr.io/ding113/claude-code-hub:latest (and in this repo’s Dockerfile the runtime command is node server.js only if Node exists in the image). If the published image is bun-based or otherwise lacks the node binary, the healthcheck will fail continuously and the service will be marked unhealthy. Consider switching back to a healthcheck that relies on tools guaranteed to exist in the image (or ensure node is present in the runtime image).

Prompt To Fix With AI
This is a comment left during a code review.
Path: docker-compose.yaml
Line: 70:77

Comment:
**Healthcheck uses missing `node`**

The `app` service healthcheck runs `node -e fetch(...)`, but the container image is `ghcr.io/ding113/claude-code-hub:latest` (and in this repo’s Dockerfile the runtime command is `node server.js` only if Node exists in the image). If the published image is bun-based or otherwise lacks the `node` binary, the healthcheck will fail continuously and the service will be marked unhealthy. Consider switching back to a healthcheck that relies on tools guaranteed to exist in the image (or ensure `node` is present in the runtime image).

How can I resolve this? If you propose a fix, please make it concise.

interval: 30s
timeout: 5s
retries: 3
Expand Down
2 changes: 1 addition & 1 deletion drizzle/0062_aromatic_taskmaster.sql
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ALTER TABLE "providers" ADD COLUMN "gemini_google_search_preference" varchar(20);
ALTER TABLE "providers" ADD COLUMN IF NOT EXISTS "gemini_google_search_preference" varchar(20);
1 change: 1 addition & 0 deletions drizzle/0064_harsh_dragon_lord.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE "providers" ADD COLUMN IF NOT EXISTS "group_priorities" jsonb DEFAULT 'null'::jsonb;
Loading
Loading