feat: add Docker Compose runner #2

Merged
pregno merged 1 commit from feat/1-docker-compose-config-yaml into main 2026-06-15 09:16:48 +02:00
Owner

Summary

  • Add a Dockerfile for running PivotBot in a Python 3.11 container.
  • Add Docker Compose support that builds the local image, loads .env, and mounts ./config.yaml read-only at /app/config.yaml.
  • Add .dockerignore / .gitignore coverage for secrets, local config, caches, git metadata, and runtime artifacts.
  • Document Docker Compose setup, build, smoke test, backtest, live/paper run, stop, and persistence notes.

Closes #1

Test plan

  • docker compose config
  • uv run --no-sync --with pytest python -m pytest — 155 passed, 1 warning
  • uv run --no-sync python -m pivotbot --help
  • docker compose build ⚠️ blocked in this cron environment because Docker daemon/socket is unavailable: /Users/andrea/.docker/run/docker.sock
  • docker compose run --rm pivotbot python -m pivotbot --help ⚠️ not run for the same Docker daemon limitation

Risk notes

  • Compose defaults to python -m pivotbot live --config /app/config.yaml; paper/live behavior remains controlled by config.yaml and the existing I_UNDERSTAND_LIVE_TRADING=yes safety gate.
  • Runtime persistence for DB/log/HALT files requires host paths configured in config.yaml and mounted as documented.
## Summary - Add a Dockerfile for running PivotBot in a Python 3.11 container. - Add Docker Compose support that builds the local image, loads `.env`, and mounts `./config.yaml` read-only at `/app/config.yaml`. - Add `.dockerignore` / `.gitignore` coverage for secrets, local config, caches, git metadata, and runtime artifacts. - Document Docker Compose setup, build, smoke test, backtest, live/paper run, stop, and persistence notes. Closes #1 ## Test plan - `docker compose config` ✅ - `uv run --no-sync --with pytest python -m pytest` ✅ — 155 passed, 1 warning - `uv run --no-sync python -m pivotbot --help` ✅ - `docker compose build` ⚠️ blocked in this cron environment because Docker daemon/socket is unavailable: `/Users/andrea/.docker/run/docker.sock` - `docker compose run --rm pivotbot python -m pivotbot --help` ⚠️ not run for the same Docker daemon limitation ## Risk notes - Compose defaults to `python -m pivotbot live --config /app/config.yaml`; paper/live behavior remains controlled by `config.yaml` and the existing `I_UNDERSTAND_LIVE_TRADING=yes` safety gate. - Runtime persistence for DB/log/HALT files requires host paths configured in `config.yaml` and mounted as documented.
pregno merged commit bf359af01d into main 2026-06-15 09:16:48 +02:00
pregno deleted branch feat/1-docker-compose-config-yaml 2026-06-15 09:16:48 +02:00
pregno referenced this pull request from a commit 2026-06-15 09:16:49 +02:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
pregno/daytrading!2
No description provided.