mirror of
https://github.com/tiennm99/ccs.git
synced 2026-07-15 18:21:09 +00:00
* fix(ci): breaking-change-guard skips missing base files (CI-1) Guard each git-show call with git cat-file -e existence check before attempting to read docker/compose.yaml from the base branch. When the file doesn't exist on the base (new file in this PR), the script would crash with "fatal: path exists on disk but not in origin/dev". New files can't cause a contract regression, so we exit early with breaking=0. * style: prettier reformat unrelated drift (CI-2) Two files had minor formatting drift from earlier umbrella PRs: - src/cliproxy/quota/quota-manager.ts - src/management/checks/image-analysis-check.ts No logic changes — formatter-only pass to unblock CI format:check. * fix(test): update trusted-author gate count to 4 in ci-workflow test (CI-3) PR #1260 added a compose-parity job to ci.yml. That job runs on self-hosted runners using PR-provided checkout, so it legitimately requires the trusted-author guard (same as validate, build, test). The test expected 3 occurrences; the correct count is now 4: validate (matrix), build, test, compose-parity. * fix(ci): smoke-test passes compose path + image ref to network-contract (REV-1) network-contract.sh signature is: <compose-file> [image-ref] The smoke-test job was calling it as: bash tests/docker/network-contract.sh "${{ steps.image.outputs.ref }}" which placed the image ref in the compose-file position ($1), causing the script to try docker compose -f <image-ref> which fails. Corrected to: bash tests/docker/network-contract.sh docker/compose.yaml "${{ steps.image.outputs.ref }}" Also removes publish-dashboard from smoke-test.needs (REV-2): when publish-dashboard is SKIPPED on prerelease events, GitHub Actions propagates the skip to downstream jobs, so smoke-test and promote-mutable-tags were silently skipped on every rc.N publish. smoke-test only verifies the integrated image; it has no dependency on the legacy dashboard image job. * docs(docker): annotate /root/.ccs path in compose volume (REV-3 clarification) The reviewer raised a concern that the compose volume mounts /root/.ccs but the entrypoint might default to /home/node/.ccs. This is a false positive: the integrated image uses entrypoint-integrated.sh (not entrypoint.sh), which runs under supervisord with user=root and explicitly mkdir -p /root/.ccs. HOME is /root inside the container. The volume mount at /root/.ccs is correct. Added an inline comment documenting the reasoning so future reviewers do not confuse entrypoint.sh (legacy dashboard image) with entrypoint-integrated.sh (integrated image). * fix(ci): gate docs-parity pull_request job to trusted authors docs-parity.yml runs on a self-hosted runner and checks out PR code. The self-hosted-runner-policy test requires any such workflow to include the trusted-author guard. The workflow was missing the guard, causing bun test:fast to fail with 1 failure. Allow push events (no author check needed — push is to own branch) and trusted-contributor PRs only.
61 lines
2.0 KiB
YAML
61 lines
2.0 KiB
YAML
# Canonical CCS docker-compose. Served at https://ccs.kaitran.ca/docker-compose.yaml.
|
|
# Source of truth: kaitranntt/ccs:docker/compose.yaml
|
|
#
|
|
# Quick start:
|
|
# curl -fsSL https://ccs.kaitran.ca/docker-compose.yaml -o compose.yaml
|
|
# docker compose up -d
|
|
#
|
|
# Ports:
|
|
# 3000 — CCS Dashboard
|
|
# 8317 — CLIProxy API
|
|
#
|
|
# restart: unless-stopped ensures the container restarts automatically on
|
|
# system reboot or crash, but honours a deliberate `docker compose stop`.
|
|
|
|
services:
|
|
ccs:
|
|
image: ghcr.io/kaitranntt/ccs:latest
|
|
restart: unless-stopped
|
|
ports:
|
|
- "3000:3000"
|
|
- "8317:8317"
|
|
volumes:
|
|
# /root/.ccs matches the HOME used inside the integrated image.
|
|
# entrypoint-integrated.sh runs as root (supervisord user=root) and
|
|
# explicitly mkdir -p /root/.ccs, so state always lands here.
|
|
# Note: docker/entrypoint.sh (legacy dashboard image) uses a different
|
|
# default — it does NOT apply to this integrated image.
|
|
- ccs_home:/root/.ccs
|
|
- ccs_logs:/var/log/ccs
|
|
networks:
|
|
- ccs-net
|
|
healthcheck:
|
|
# Probes both Dashboard (:3000) and CLIProxy (:8317) before reporting
|
|
# healthy — a container with only one service running is not considered
|
|
# ready. Uses a 4.5s internal timeout to stay well within the 5s Docker
|
|
# timeout budget.
|
|
test:
|
|
- "CMD-SHELL"
|
|
- >
|
|
node -e "
|
|
const http = require('http');
|
|
let pending = 2; let ok = true;
|
|
const check = (port) => http.get('http://127.0.0.1:'+port+'/', r => {
|
|
if (r.statusCode >= 500) ok = false;
|
|
if (--pending === 0) process.exit(ok ? 0 : 1);
|
|
}).on('error', () => { ok = false; if (--pending === 0) process.exit(1); });
|
|
check(3000); check(8317);
|
|
setTimeout(() => process.exit(1), 4500);
|
|
"
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
|
|
volumes:
|
|
ccs_home:
|
|
ccs_logs:
|
|
|
|
networks:
|
|
ccs-net:
|
|
name: ccs-net
|