Initial AlphaPulse implementation: news crawler and Binance klines
- Backend (FastAPI, SQLAlchemy 2, Alembic): single-admin cookie auth, news/crawler/market APIs with SSE and WebSocket streaming - Crawler (Scrapy + Scrapy-Redis): wscn_news, wscn_live, cls_depth, cls_telegraph spiders, idempotent upserts with revisions, raw response archiving, per-source subprocess supervision, restart and backoff - Market worker: full-history Binance spot/USD-M kline backfill, realtime WS stream, hourly and on-reconnect catch-up - Frontend (Vue 3, Element Plus, UnoCSS, KLineChart): news feed, crawler console with live logs, Binance-style chart page - Deploy: docker compose, nginx site, migrate and daily backup scripts
This commit is contained in:
commit
aabc81ba5b
88 files changed
+12603
No files matched your search
@@ -0,0 +1,39 @@
|
||||
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]
|
||||
|
||||
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
|
||||
Reference in new issue
Block a user