Files
momentum-system/deploy/compose/grafana/datasources/momentum.yaml
T
Claude a76c0b5376 Add Docker Compose stack for local development
Single-machine equivalent of the Helm package: builds the app from the
Dockerfile, runs PostgreSQL with a persistent volume, and starts the trading
loop with its embedded dashboard on :8010.

- postgres:16 with healthcheck + named volume; app waits on it healthy
- DATABASE_URL overridden to the in-network postgres service (self-contained);
  .env is optional (dry mode without ALPACA_* keys)
- journal / eod-replay / nightly-tune under a "jobs" profile, run on demand;
  they share the app-data volume so learned_params.json reaches the loop
- Grafana under a "monitoring" profile with a compose-specific datasource
  override pointed at the postgres service
- deploy/README.md documents the Compose workflow

Validated with `docker compose config` across all profiles.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JCVMm2AbmZvvxwLTX6UpNR
2026-06-29 21:40:19 +00:00

20 lines
575 B
YAML

# Grafana datasource for the docker-compose stack — points at the in-network
# `postgres` service (not the LAN IP used by grafana/provisioning/datasources).
# Credentials are interpolated from the PG_* env vars set on the grafana service.
apiVersion: 1
datasources:
- name: Momentum
uid: momentum_pg
type: postgres
access: proxy
url: postgres:5432
user: ${PG_USER}
jsonData:
database: ${PG_DATABASE}
sslmode: disable
postgresVersion: 1600
secureJsonData:
password: ${PG_PASSWORD}
isDefault: true
editable: true