caelum0x 49b183818c Unify gitgram + aitimemachine into the monorepo (de-submodule) and merge vendored engines
Convert gitgram/ and aitimemachine/ from embedded git repos (which showed as
opaque submodule gitlinks on GitHub) into fully-tracked first-party content.

AITM now merges its 7 vendored repos as first-party engines:
- memory: beads (Go task DAG) + context7 (docs SDK), unified into saved_contexts
- git: vendored C git (bundled binary) + gitnexus (in-process code intelligence)
- agentic: a2a (@a2a-js/sdk) + pal (AITM-managed Python subprocess)

Includes the full session's product build: Gitgram web/mobile/backend features,
AITM website/CLI/MCP, the unified memory layer, engine build tooling
(scripts/build-engines.sh, Dockerfile, CI), docs (README, ENGINES.md, ARCHITECTURE.md),
and extensive test suites.

Build artifacts, node_modules, external/, and gemini-cli are gitignored.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 14:14:09 +03:00

102 lines
2.5 KiB
YAML

services:
pal-mcp:
build:
context: .
dockerfile: Dockerfile
target: runtime
image: pal-mcp-server:latest
container_name: pal-mcp-server
# Container labels for traceability
labels:
- "com.pal-mcp.service=pal-mcp-server"
- "com.pal-mcp.version=1.0.0"
- "com.pal-mcp.environment=production"
- "com.pal-mcp.description=AI-powered Model Context Protocol server"
# Environment variables
environment:
# Default model configuration
- DEFAULT_MODEL=${DEFAULT_MODEL:-auto}
# API Keys (use Docker secrets in production)
- GEMINI_API_KEY=${GEMINI_API_KEY}
- GOOGLE_API_KEY=${GOOGLE_API_KEY}
- OPENAI_API_KEY=${OPENAI_API_KEY}
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
- XAI_API_KEY=${XAI_API_KEY}
- DIAL_API_KEY=${DIAL_API_KEY}
- DIAL_API_HOST=${DIAL_API_HOST}
- DIAL_API_VERSION=${DIAL_API_VERSION}
- OPENROUTER_API_KEY=${OPENROUTER_API_KEY}
- CUSTOM_API_URL=${CUSTOM_API_URL}
- CUSTOM_API_KEY=${CUSTOM_API_KEY}
- CUSTOM_MODEL_NAME=${CUSTOM_MODEL_NAME}
# Logging configuration
- LOG_LEVEL=${LOG_LEVEL:-INFO}
- LOG_MAX_SIZE=${LOG_MAX_SIZE:-10MB}
- LOG_BACKUP_COUNT=${LOG_BACKUP_COUNT:-5}
# Advanced configuration
- DEFAULT_THINKING_MODE_THINKDEEP=${DEFAULT_THINKING_MODE_THINKDEEP:-high}
- DISABLED_TOOLS=${DISABLED_TOOLS}
- MAX_MCP_OUTPUT_TOKENS=${MAX_MCP_OUTPUT_TOKENS}
# Server configuration
- PYTHONUNBUFFERED=1
- PYTHONPATH=/app
- TZ=${TZ:-UTC}
# Volumes for persistent data
volumes:
- ./logs:/app/logs
- pal-mcp-config:/app/conf
- /etc/localtime:/etc/localtime:ro
# Network configuration
networks:
- pal-network
# Resource limits
deploy:
resources:
limits:
memory: 512M
cpus: '0.5'
reservations:
memory: 256M
cpus: '0.25'
# Health check
healthcheck:
test: ["CMD", "python", "/usr/local/bin/healthcheck.py"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
# Restart policy
restart: unless-stopped
# Security
security_opt:
- no-new-privileges:true
read_only: true
tmpfs:
- /tmp:noexec,nosuid,size=100m
- /app/tmp:noexec,nosuid,size=50m
# Named volumes
volumes:
pal-mcp-config:
driver: local
# Networks
networks:
pal-network:
driver: bridge
ipam:
config:
- subnet: 172.20.0.0/16