Files
APAW/agent-evolution/docker-compose.yml
Deploy Bot b95fd41587 feat(evolution): add real-fit dashboard, API, report builder, and docker compose
- real-fit.html: API-driven research dashboard with agent/model heatmap, detail modal with score breakdown and evaluator commentary
- api.py: FastAPI backend serving /api/real-fit-report (dynamic from SQLite), /api/research, /api/evolve-agent/start
- rebuild-report.py: generates real-fit-report.json from SQLite DB for static fallback
- docker-compose.yml: add evolution-api service (Python 3.12, uvicorn) for research endpoints
- index.standalone.html: sync with dashboard data updates
- archive/index.html: standalone dashboard snapshot (263KB)
- .gitignore: exclude *.db, research-jobs.json from tracking
2026-05-28 11:55:49 +01:00

103 lines
3.1 KiB
YAML

# Docker Compose for Agent Evolution Dashboard + Research API (mount-driven, no-rebuild)
# Usage:
# docker compose -f agent-evolution/docker-compose.yml up -d
# # Edit any file on host → instant reflection in containers
# # Dashboard: http://localhost:3003
# # API: http://localhost:3004
#
services:
evolution-dashboard:
image: python:3.12-alpine
container_name: apaw-evolution
ports:
- "3003:80"
volumes:
# Mount the generated standalone HTML to the container's web root
- ./index.standalone.html:/app/index.html:ro
# Mount real-fit standalone report
- ./real-fit.html:/app/real-fit.html:ro
# Mount data directory for any additional assets
- ./data:/app/data:ro
# Mount .kilo directory for live config access
- ../.kilo:/app/kilo:ro
working_dir: /app
command: ["python3", "-m", "http.server", "80"]
environment:
- NODE_ENV=production
- TZ=UTC
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:80/"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
networks:
- evolution-network
labels:
- "com.apaw.service=evolution-dashboard"
- "com.apaw.description=Agent Evolution Dashboard"
evolution-api:
image: python:3.12-alpine
container_name: apaw-evolution-api
ports:
- "3004:8000"
volumes:
# API source code
- ./api.py:/app/api.py:ro
- ./requirements.txt:/app/requirements.txt:ro
# Data directory (read-write for job state and reports)
- ./data:/app/data:rw
# real-fit-engine.py script
- ../scripts/real-fit-engine.py:/app/scripts/real-fit-engine.py:ro
# Agent definitions and metadata
- ../.kilo/agents:/app/agents:ro
- ../kilo-meta.json:/app/kilo-meta.json:ro
working_dir: /app
command: >
sh -c "pip install --no-cache-dir -r requirements.txt && uvicorn api:app --host 0.0.0.0 --port 8000"
environment:
- TZ=UTC
- PYTHONUNBUFFERED=1
- JOB_STATE_PATH=/app/data/research-jobs.json
- REPORT_PATH=/app/data/real-fit-report.json
- META_PATH=/app/kilo-meta.json
- EVOLUTION_PATH=/app/data/evolution.json
- ENGINE_PATH=/app/scripts/real-fit-engine.py
- REAL_FIT_DB=/app/data/real-fit.db
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8000/api/models"]
interval: 30s
timeout: 10s
retries: 3
start_period: 15s
networks:
- evolution-network
labels:
- "com.apaw.service=evolution-api"
- "com.apaw.description=Agent Evolution Research API"
# Optional: Nginx reverse proxy with SSL
evolution-nginx:
image: nginx:alpine
container_name: apaw-evolution-nginx
profiles:
- nginx
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
- ./ssl:/etc/nginx/ssl:ro
depends_on:
- evolution-dashboard
- evolution-api
networks:
- evolution-network
networks:
evolution-network:
driver: bridge