mirror of
https://github.com/cocoindex-io/cocoindex-code.git
synced 2026-09-14 16:39:38 +08:00
12ca493b85
- docker/Dockerfile — multi-stage build (builder → model_cache →
runtime);
copies both `cocoindex-code` and `ccc` binaries; sets
COCOINDEX_CODE_DB_PATH_MAPPING=/workspace=/db so index databases live
in the container's native filesystem (avoids slow cross-OS volume I/O)
- docker/entrypoint.sh — creates user settings on first start via
`ccc init`, then runs `ccc run-daemon` in the foreground to keep the
container alive as a persistent daemon
- README — adds Docker section: persistent container as primary pattern
(`docker run -d` + `docker exec`), named volumes for DB and model cache,
Claude Code / Codex MCP configuration via `docker exec -i ... ccc mcp`
10 lines
297 B
Bash
10 lines
297 B
Bash
#!/bin/sh
|
|
# Initialize user settings on first run, then hand off to the daemon.
|
|
set -e
|
|
|
|
# `ccc init` creates ~/.cocoindex_code/global_settings.yml if it doesn't exist.
|
|
# It reads COCOINDEX_CODE_EMBEDDING_MODEL and other env vars at this point.
|
|
ccc init -f 2>/dev/null || true
|
|
|
|
exec ccc run-daemon
|