FastAPI backend with a single-strategy async engine, paper and Binance brokers, pure-python indicators, a backtester that shares the engine's portfolio math, and a Vue dashboard with a live WebSocket feed. Adds the Gitea Actions CI/CD workflow that deploys to Traefik via docker_default.
38 lines
1.1 KiB
YAML
38 lines
1.1 KiB
YAML
# Local / self-contained stack: no Traefik, publishes ports directly.
|
|
# Usage: docker compose -f docker-compose.local.yml up --build
|
|
# Dashboard: http://localhost:8080 API docs: http://localhost:8000/docs
|
|
name: crypto_trading_local
|
|
|
|
services:
|
|
backend:
|
|
build: ./backend
|
|
container_name: crypto-trading-backend-local
|
|
restart: unless-stopped
|
|
environment:
|
|
- MODE=${MODE:-paper}
|
|
- EXCHANGE=${EXCHANGE:-binance}
|
|
- SYMBOL=${SYMBOL:-BTC/USDT}
|
|
- TIMEFRAME=${TIMEFRAME:-1m}
|
|
- POLL_INTERVAL=${POLL_INTERVAL:-5}
|
|
- STARTING_BALANCE=${STARTING_BALANCE:-10000}
|
|
- FEE_BPS=${FEE_BPS:-10}
|
|
- SLIPPAGE_BPS=${SLIPPAGE_BPS:-5}
|
|
- DATABASE_URL=sqlite:////data/trader.db
|
|
- CORS_ORIGINS=*
|
|
- EXCHANGE_API_KEY=${EXCHANGE_API_KEY:-}
|
|
- EXCHANGE_API_SECRET=${EXCHANGE_API_SECRET:-}
|
|
- EXCHANGE_SANDBOX=${EXCHANGE_SANDBOX:-false}
|
|
volumes:
|
|
- ./data:/data
|
|
ports:
|
|
- "8000:8000"
|
|
|
|
frontend:
|
|
build: ./frontend
|
|
container_name: crypto-trading-frontend-local
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- backend
|
|
ports:
|
|
- "8080:80"
|