2a11728384
Wire the Docker image and compose service for the capital-pool portfolio paper trader (src.portfolio.runner) instead of the single-leg multi_runner: - Dockerfile: copy full scripts/ (runner imports scripts.analysis.* and scripts.portfolios._defs via sleeves.py) and portfolios.yml. - docker-compose.yml: service "portfolio" / container pythagoras-portfolio, command override to src.portfolio.runner, mount portfolios.yml, healthcheck on data/portfolios/ status.json. - .gitignore: ignore portfolio runtime state (data/portfolio_paper, data/portfolios). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
19 lines
549 B
YAML
19 lines
549 B
YAML
services:
|
|
portfolio:
|
|
build: .
|
|
container_name: pythagoras-portfolio
|
|
restart: unless-stopped
|
|
command: ["uv", "run", "python", "-m", "src.portfolio.runner"]
|
|
volumes:
|
|
- ./data:/app/data
|
|
- ./portfolios.yml:/app/portfolios.yml:ro
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
- PYTHONUNBUFFERED=1
|
|
healthcheck:
|
|
test: ["CMD", "python", "-c", "import os; assert any(f.endswith('status.json') for r,d,fs in os.walk('/app/data/portfolios') for f in fs)"]
|
|
interval: 120s
|
|
timeout: 10s
|
|
retries: 3
|