Files
mt5cli/examples/grafana/docker-compose.yml
T
agent 4c2e25af8a feat: Grafana copy publishing, dashboard examples, and optional OTel metrics
Implements three observability improvements:

#82 — publish_grafana_copy(): Uses SQLite online backup API (WAL-safe) to
atomically publish a consistent read-only copy beside the target. Adds
--publish-copy option to grafana-schema and snapshot CLI commands.

#83 — examples/grafana/: Minimal working Grafana setup with docker-compose,
provisioning datasource/dashboard YAML, and three dashboard JSON files
(mt5cli-overview, mt5cli-trades, mt5cli-market). All queries use grafana_*
views; no credentials or private paths included.

#84 — mt5cli/telemetry.py: Optional OTel metrics behind mt5cli[otel] extra.
Base install is unaffected. Adds _Mt5Metrics singleton (no-op until
configure_metrics() is called), wraps update_history() and
update_observability() with record_history_update / record_snapshot_update
context managers, and emits account/position gauges from snapshots.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 23:17:13 +00:00

25 lines
695 B
YAML

# Docker Compose for Grafana with mt5cli SQLite datasource.
#
# Set MT5CLI_DB_PATH to the absolute host path of your published .db file
# before running `docker compose up -d`.
#
# Example:
# MT5CLI_DB_PATH=/home/user/history.grafana.db docker compose up -d
services:
grafana:
image: grafana/grafana:latest
ports:
- "3000:3000"
environment:
GF_PATHS_PROVISIONING: /etc/grafana/provisioning
volumes:
- ./provisioning:/etc/grafana/provisioning:ro
- ./dashboards:/var/lib/grafana/dashboards:ro
- grafana-storage:/var/lib/grafana
- ${MT5CLI_DB_PATH:-/tmp/mt5cli-placeholder.db}:/data/mt5cli.db:ro
user: "472"
volumes:
grafana-storage: