Add trading_symbols, trading_analyses, trading_orders and trading_events. The new trader service publishes account, position and open-order snapshots of the Binance demo account to Redis every 3s. The /trading page shows engine status, start/stop, balances, positions, the symbol list with angle selection, open orders and the event timeline.
44 lines
956 B
YAML
44 lines
956 B
YAML
name: alphapulse
|
|
|
|
x-backend: &backend
|
|
build:
|
|
context: ../backend
|
|
dockerfile: ../deploy/Dockerfile.backend
|
|
image: alphapulse-backend
|
|
env_file: ../.env
|
|
restart: unless-stopped
|
|
networks: [dev_default]
|
|
|
|
services:
|
|
api:
|
|
<<: *backend
|
|
command: [uvicorn, alphapulse.api.main:app, --host, 0.0.0.0, --port, "8000", --proxy-headers, --forwarded-allow-ips, "*"]
|
|
|
|
crawler:
|
|
<<: *backend
|
|
command: [python, -m, alphapulse.crawler.manager]
|
|
# 留时间给 scrapy 子进程优雅退出并刷完日志
|
|
stop_grace_period: 30s
|
|
|
|
market:
|
|
<<: *backend
|
|
command: [python, -m, alphapulse.market.worker]
|
|
|
|
trader:
|
|
<<: *backend
|
|
command: [python, -m, alphapulse.trading.engine]
|
|
|
|
web:
|
|
build:
|
|
context: ../web
|
|
dockerfile: ../deploy/Dockerfile.web
|
|
restart: unless-stopped
|
|
depends_on: [api]
|
|
ports:
|
|
- 127.0.0.1:21030:80
|
|
networks: [dev_default]
|
|
|
|
networks:
|
|
dev_default:
|
|
external: true
|