Files
xmwork/docker-compose.yml
T
gongzhiyong 3112ca1d7c initial: team agent workstation for 6-repo matrix
- Dockerfile (Node/Python/Go/Bun + claude-code + gh cli)
- docker-compose.yml (flexible REPOS_DIR, 7 mounts, 6 cache volumes)
- CLAUDE.md (team conventions + red lines + per-repo build/test cmds)
- .claude/settings.json (allow/deny permissions)
- Makefile + scripts/{enter,bootstrap,run-task}.sh
- README.md (onboarding guide)
2026-04-23 23:11:16 +08:00

60 lines
2.0 KiB
YAML

name: ai-ops
services:
claude-agent:
build:
context: .
dockerfile: Dockerfile
image: claude-agent-6repos:latest
container_name: claude-agent
hostname: claude-agent
stdin_open: true
tty: true
working_dir: /workspace
environment:
ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY:-}
ANTHROPIC_MODEL: ${ANTHROPIC_MODEL:-claude-opus-4-7}
CLAUDE_CODE_USE_BEDROCK: ${CLAUDE_CODE_USE_BEDROCK:-}
AWS_REGION: ${AWS_REGION:-}
AWS_PROFILE: ${AWS_PROFILE:-}
GH_TOKEN: ${GH_TOKEN:-}
GITHUB_TOKEN: ${GH_TOKEN:-}
GIT_AUTHOR_NAME: ${GIT_AUTHOR_NAME:-Claude Agent}
GIT_AUTHOR_EMAIL: ${GIT_AUTHOR_EMAIL:-claude-agent@local}
GIT_COMMITTER_NAME: ${GIT_AUTHOR_NAME:-Claude Agent}
GIT_COMMITTER_EMAIL: ${GIT_AUTHOR_EMAIL:-claude-agent@local}
TERM: xterm-256color
volumes:
# REPOS_DIR 默认指向 ai-ops 的父目录;队友可在 .env 里改成自己的工作目录
- ${REPOS_DIR:-..}/chat-gw:/workspace/chat-gw
- ${REPOS_DIR:-..}/xiaoshou:/workspace/xiaoshou
- ${REPOS_DIR:-..}/gongdan:/workspace/gongdan
- ${REPOS_DIR:-..}/casdoor-internal:/workspace/casdoor-internal
- ${REPOS_DIR:-..}/CloudCostbrank:/workspace/CloudCostbrank
- ${REPOS_DIR:-..}/lobechat-enterprise:/workspace/lobechat-enterprise
- ./CLAUDE.md:/workspace/CLAUDE.md:ro
- ./.claude:/workspace/.claude
- claude-home:/root/.claude
- pip-cache:/root/.cache/pip
- go-cache:/root/go/pkg
- npm-cache:/root/.npm
- pnpm-store:/root/.local/share/pnpm/store
- bun-cache:/root/.bun/install/cache
- ${HOME}/.ssh:/root/.ssh:ro
# 注意:不要挂载 ~/.gitconfig —— 若宿主机没这个文件,Docker 会
# 把它自动创建为「空目录」,导致 git 报错。用上面 GIT_AUTHOR_*
# 环境变量就足够了。
healthcheck:
test: ["CMD", "claude", "--version"]
interval: 30s
timeout: 10s
retries: 3
volumes:
claude-home:
pip-cache:
go-cache:
npm-cache:
pnpm-store:
bun-cache: