Files
cointrader/dashboard/SETUP.md
21in7 565414c5e0 feat: add trading dashboard with API and UI components
- Introduced a new trading dashboard consisting of a FastAPI backend (`dashboard-api`) for data retrieval and a React frontend (`dashboard-ui`) for visualization.
- Implemented a log parser to monitor and store bot logs in an SQLite database.
- Configured Docker setup for both API and UI, including necessary Dockerfiles and a docker-compose configuration.
- Added setup documentation for running the dashboard and accessing its features.
- Enhanced the Jenkins pipeline to build and push the new dashboard images.
2026-03-05 20:25:45 +09:00

1.1 KiB

Trading Dashboard

봇과 통합된 대시보드. 봇 로그를 읽기 전용으로 마운트하여 실시간 시각화합니다.

구조

dashboard/
├── SETUP.md
├── api/
│   ├── Dockerfile
│   ├── log_parser.py
│   ├── dashboard_api.py
│   └── entrypoint.sh
└── ui/
    ├── Dockerfile
    ├── nginx.conf
    ├── package.json
    ├── vite.config.js
    ├── index.html
    └── src/
        ├── main.jsx
        └── App.jsx

실행

루트 디렉토리에서 봇과 함께 실행:

# 전체 (봇 + 대시보드)
docker compose up -d --build

# 대시보드만
docker compose up -d --build dashboard-api dashboard-ui

접속

http://<서버IP>:8080

동작 방식

  • dashboard-api: 로그 파서 + FastAPI 서버 (봇 로그 → SQLite → REST API)
  • dashboard-ui: React + Vite (빌드 후 nginx에서 서빙, API 프록시)
  • 봇 로그 디렉토리를 :ro (읽기 전용) 마운트
  • 대시보드 DB는 Docker named volume (dashboard-data)에 저장