- 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
9 lines
456 B
Bash
9 lines
456 B
Bash
# 复制为仓库根目录 .env(chmod 600);只有这一套配置
|
|
DATABASE_URL=postgresql+asyncpg://alphapulse:<密码>@postgres:5432/alphapulse
|
|
# DB 14 与 AFFiNE 共用,key 一律带 ap: 前缀
|
|
REDIS_URL=redis://:<密码>@redis:6379/14
|
|
JWT_SECRET=<openssl rand -hex 32>
|
|
ADMIN_USERNAME=admin
|
|
# 哈希含 $,必须用单引号包住,否则 compose 会做变量替换
|
|
ADMIN_PASSWORD_HASH='<python -m alphapulse.core.auth hash-password 的输出>'
|