2.8 KiB
2.8 KiB
name, description
| name | description |
|---|---|
| cc-web-centos7-release | Rebuild and verify the cc-web CentOS 7 compatible Bun baseline single executable release package. Use when the user asks to 打包, 重新打包, build single-exe, CentOS 7 发布包, dist-exe/cc-web-bun-linux-x64-baseline.tar.gz, or asks why Bun/BUN_BIN was needed for this project. |
cc-web CentOS 7 Release
Core Rules
- Build the CentOS 7 release with
scripts/build-single-exe.js. - The default target must stay
bun-linux-x64-baseline. - The release archive is
dist-exe/cc-web-bun-linux-x64-baseline.tar.gz. - Do not switch this project back to Docker for CentOS 7 compatibility.
- Do not install NodeSource Node.js 22 on CentOS 7. CentOS 7 has glibc 2.17, while current NodeSource Node.js 22 packages require newer glibc/libstdc++ symbols.
- Do not bundle Claude/Codex CLI into the release package. cc-web must call host CLIs at runtime through
CLAUDE_PATH,CODEX_PATH, orPATH.
Build Workflow
- Check whether
bunis available:
command -v bun
- If
bunis not inPATH, reuse an existing local Bun binary before downloading anything:
find /home /tmp -type f -name bun -perm -111 2>/dev/null | head -50
Prefer a baseline binary path like:
/tmp/ccweb-bun.*/node_modules/@oven/bun-linux-x64-baseline/bin/bun
- Build with
BUN_BINwhen using a local/temporary Bun:
BUN_BIN=/tmp/ccweb-bun.rhfNgd/node_modules/@oven/bun-linux-x64-baseline/bin/bun npm run build:single-exe
If bun is already in PATH, this is enough:
npm run build:single-exe
- After adding or changing
.codex/skills,.agents/skills, public assets, runtime assets, or server code, rebuild again. The build copies runtime assets intodist-exe/bun-linux-x64-baseline/before creating the tarball.
Verification
Run lightweight checks before committing:
node --check server.js
node --check lib/codex-app-runtime.js
node --check scripts/mock-codex-app-server.js
node --check scripts/mock-codex.js
node --check scripts/regression.js
node --check public/app.js
./dist-exe/bun-linux-x64-baseline/cc-web --ccweb-mcp-server
tar -tzf dist-exe/cc-web-bun-linux-x64-baseline.tar.gz | head
For the MCP smoke test, send one JSON-RPC initialize request on stdin and expect a valid JSON response. Do not leave the process running.
CentOS 7 Run Command
On the target machine, unpack the archive and run the binary from the release directory:
tar -xzf cc-web-bun-linux-x64-baseline.tar.gz
cd bun-linux-x64-baseline
chmod +x cc-web
PORT=8002 CC_WEB_PASSWORD='请改成强密码' ./cc-web
For background execution without PM2:
nohup env PORT=8002 CC_WEB_PASSWORD='请改成强密码' ./cc-web > logs/cc-web.out 2>&1 &
For host CLI paths:
export CLAUDE_PATH=/usr/local/bin/claude
export CODEX_PATH=/usr/local/bin/codex