mirror of
https://github.com/KeygraphHQ/shannon.git
synced 2026-03-31 18:00:40 +02:00
Restructure into apps/worker, apps/cli, packages/mcp-server with Turborepo task orchestration, pnpm workspaces, Biome linting/formatting, and tsdown CLI bundling. Key changes: - src/ -> apps/worker/src/, cli/ -> apps/cli/, mcp-server/ -> packages/mcp-server/ - prompts/ and configs/ moved into apps/worker/ - npm replaced with pnpm, package-lock.json replaced with pnpm-lock.yaml - Dockerfile updated for pnpm-based builds - CLI logs command rewritten with chokidar for cross-platform reliability - Router health checking added for auto-detected router mode - Centralized path resolution via apps/worker/src/paths.ts
53 lines
1.8 KiB
YAML
53 lines
1.8 KiB
YAML
networks:
|
|
default:
|
|
name: shannon-net
|
|
|
|
services:
|
|
temporal:
|
|
image: temporalio/temporal:latest
|
|
container_name: shannon-temporal
|
|
command: ["server", "start-dev", "--db-filename", "/home/temporal/temporal.db", "--ip", "0.0.0.0"]
|
|
ports:
|
|
- "127.0.0.1:7233:7233" # gRPC
|
|
- "127.0.0.1:8233:8233" # Web UI (built-in)
|
|
volumes:
|
|
- temporal-data:/home/temporal
|
|
healthcheck:
|
|
test: ["CMD", "temporal", "operator", "cluster", "health", "--address", "localhost:7233"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 10
|
|
start_period: 30s
|
|
|
|
# Optional: claude-code-router for multi-model support
|
|
# Start with: ROUTER=true ./shannon start ...
|
|
router:
|
|
image: node:20-slim
|
|
container_name: shannon-router
|
|
profiles: ["router"] # Only starts when explicitly requested
|
|
command: >
|
|
sh -c "apt-get update && apt-get install -y gettext-base &&
|
|
npm install -g @musistudio/claude-code-router &&
|
|
mkdir -p /root/.claude-code-router &&
|
|
envsubst < /config/router-config.json > /root/.claude-code-router/config.json &&
|
|
ccr start"
|
|
ports:
|
|
- "127.0.0.1:3456:3456"
|
|
volumes:
|
|
- ./apps/cli/infra/router-config.json:/config/router-config.json:ro
|
|
environment:
|
|
- HOST=0.0.0.0
|
|
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY:-}
|
|
- OPENAI_API_KEY=${OPENAI_API_KEY:-}
|
|
- OPENROUTER_API_KEY=${OPENROUTER_API_KEY:-}
|
|
- ROUTER_DEFAULT=${ROUTER_DEFAULT:-openai,gpt-4o}
|
|
healthcheck:
|
|
test: ["CMD", "node", "-e", "require('http').get('http://localhost:3456/health', r => process.exit(r.statusCode === 200 ? 0 : 1)).on('error', () => process.exit(1))"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 30s
|
|
|
|
volumes:
|
|
temporal-data:
|