Commit Graph
6 Commits
Author SHA1 Message Date
Kai (Tam Nhu) TranandGitHub aef331d8ef fix(docker): pin runtime deps to committed bun lockfile (#1358) 2026-05-23 21:19:31 -04:00
Tam Nhu Tran 4d7f30a260 chore(docker): skip ccs postinstall in legacy image 2026-05-22 14:10:29 -04:00
Kai (Tam Nhu) TranandGitHub 775f438d78 refactor(docker): drop Bun from runtime stage; generate npm lockfile in build stage (#1256)
- Build stage keeps Bun for fast installs; appends `npm install --package-lock-only`
  to generate an ephemeral package-lock.json immediately after `bun run build:all`.
- Runtime stage removes BUN_VERSION ARG/ENV, the bun.sh curl install, and
  `bun install --frozen-lockfile --production`. Replaces with:
    COPY --from=build /app/package.json /app/package-lock.json ./
    RUN npm ci --omit=dev --ignore-scripts
- --ignore-scripts rationale: postinstall (scripts/postinstall.js) writes ~/.ccs/
  config — not needed in Docker context. bcrypt v6+ is pure-JS, no native compile.
- package-lock.json already in .gitignore (line 33); never committed.
- docker/Dockerfile.integrated unchanged — no Bun present there (alpine + npm).
- Targets: image size reduction >= 300 MB by eliminating ~130 MB Bun binary + installer.
2026-05-16 12:33:45 -04:00
kaitranntt 1dee71897e fix(docker): use bun 1.2.21 2026-01-18 08:11:54 -05:00
kaitrannttandopastorello b38641002f fix(docker): address security and reproducibility issues
Fixes from maintainer review:

.dockerignore:
- Add .env* files to prevent secret leakage (CRITICAL)
- Add tests/, docs/, IDE files to reduce build context
- Add organized comments for maintainability

Dockerfile:
- Pin bun version (ARG BUN_VERSION=1.2.2) for reproducible builds
- Add build artifact validation step
- Add npm cache clean to reduce image size
- Add section comments for readability

docker-compose.yml:
- Add grok_home volume for grok-cli persistence
- Add start_period to healthcheck for slow starts
- Add resource limits (1G RAM, 2 CPUs) with reservations
- Add documentation comments

entrypoint.sh:
- Improve chown error handling with warning message
- Add usage help when no command provided

README.md:
- Add Resource Limits section with examples
- Add Graceful Shutdown documentation
- Add Troubleshooting section (permissions, ports, restart loops)
- Add Security Notes section
- Update persistence docs to include grok-cli

Co-authored-by: opastorello <nicolas@pastorello-lab.com.br>
2026-01-18 08:10:44 -05:00
opastorello a14c7f3f6b feat(docker): add Docker/Compose setup for CCS dashboard 2026-01-17 00:19:53 -03:00