abf5a140e2
Each bot now manages its own notification + portfolio aggregation: * TelegramClient calls the public Bot API directly via httpx, reading CERBERO_BITE_TELEGRAM_BOT_TOKEN / CERBERO_BITE_TELEGRAM_CHAT_ID from env. No credentials → silent disabled mode. * PortfolioClient composes DeribitClient + HyperliquidClient + the new MacroClient.get_asset_price/eur_usd_rate to expose equity (EUR) and per-asset exposure as the bot's own slice (no cross-bot view). * mcp-telegram and mcp-portfolio removed from MCP_SERVICES / McpEndpoints and the cerbero-bite ping CLI; health_check no longer probes portfolio. Docs (02/04/06/07) and docker-compose updated to reflect the new architecture. 353/353 tests pass; ruff clean; mypy src clean. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
65 lines
2.1 KiB
YAML
65 lines
2.1 KiB
YAML
# docker-compose.yml — Cerbero Bite
|
|
#
|
|
# Bite runs in its own Compose project but joins the same Docker
|
|
# network used by Cerbero_mcp so it can resolve `mcp-deribit`,
|
|
# `mcp-macro` and friends by their service name (see the gateway
|
|
# Caddyfile in Cerbero_mcp).
|
|
#
|
|
# The shared network is declared as external here. Create it once on
|
|
# the host with `docker network create cerbero-suite` (or rename the
|
|
# Cerbero_mcp network to `cerbero-suite` and mark it external).
|
|
#
|
|
# Secrets are read from ./secrets/, which is .gitignore'd.
|
|
|
|
networks:
|
|
cerbero-suite:
|
|
external: true
|
|
|
|
secrets:
|
|
core_token:
|
|
file: ./secrets/core.token
|
|
|
|
volumes:
|
|
bite-data:
|
|
|
|
services:
|
|
cerbero-bite:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
image: cerbero-bite:dev
|
|
restart: unless-stopped
|
|
networks: [cerbero-suite]
|
|
cap_drop: [ALL]
|
|
security_opt:
|
|
- no-new-privileges:true
|
|
secrets:
|
|
- core_token
|
|
environment:
|
|
CERBERO_BITE_CORE_TOKEN_FILE: /run/secrets/core_token
|
|
# Service URLs — the defaults below match the cerbero-suite
|
|
# network DNS. Override per service if you need to point at a
|
|
# different host (dev only).
|
|
CERBERO_BITE_MCP_DERIBIT_URL: http://mcp-deribit:9011
|
|
CERBERO_BITE_MCP_HYPERLIQUID_URL: http://mcp-hyperliquid:9012
|
|
CERBERO_BITE_MCP_MACRO_URL: http://mcp-macro:9013
|
|
CERBERO_BITE_MCP_SENTIMENT_URL: http://mcp-sentiment:9014
|
|
# Telegram and Portfolio are no longer shared MCP services. The
|
|
# bot now calls the Telegram Bot API directly and aggregates
|
|
# portfolio in-process from Deribit + Hyperliquid + Macro.
|
|
# Set the two env vars below to enable Telegram notifications.
|
|
# CERBERO_BITE_TELEGRAM_BOT_TOKEN: ...
|
|
# CERBERO_BITE_TELEGRAM_CHAT_ID: ...
|
|
volumes:
|
|
- bite-data:/app/data
|
|
healthcheck:
|
|
test:
|
|
["CMD", "cerbero-bite", "healthcheck", "--db", "/app/data/state.sqlite"]
|
|
interval: 60s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 120s
|
|
# Default command runs the engine status check; override with the
|
|
# CLI subcommand of choice (start, ping, dry-run, ...).
|
|
command: ["status"]
|