- Remove ~44k LOC of dead code, legacy v1 TS simulator/strategy stack, event-bus, analytics FastAPI prototype, legacy calculation archives, and unused deps (data-ingestion provider API handlers untouched) - Extract @stock-bot/di/http-security and isolate @stock-bot/browser to data-ingestion via ServiceContainerBuilder.withRegistrations() - Harden @stock-bot/mongodb read-only proxies, flatten @stock-bot/postgres with unified master+research migrations, and fix @stock-bot/config EnvLoader, ServiceApplication worker lifecycle, NamespacedCache.clear(), and BatchProcessor error propagation - Flatten workspace root (remove apps/stock/package.json) and collapse orchestrator re-export shims - Pin all Docker image versions, add shm_size/nofile/RAM caps and docker-compose.quant.yml, fix 05-add-visible-column.sql view recreation, and decouple dev/QA Compose project names for side-by-side execution - Update PLATFORM-PLAN, DATA-CONTRACTS (bars_1m PARTITION BY MONTH, Rust bulk ETL, DuckDB limits), MILESTONES, and servers docs
51 lines
1.7 KiB
Text
51 lines
1.7 KiB
Text
# QA environment (existing local stack backed by stock-bot_mongodb_data & stock-bot_postgres_data)
|
|
# Copy your existing .env to .env.qa and set NODE_ENV=qa.
|
|
# Run services with: bun --env-file=.env.qa run dev
|
|
|
|
NODE_ENV=qa
|
|
|
|
# Auth tokens (generate with: openssl rand -hex 32)
|
|
STOCK_BOT_ADMIN_TOKEN=
|
|
STOCK_BOT_SERVICE_TOKEN=
|
|
STOCK_BOT_READ_TOKEN=
|
|
STOCK_BOT_HTTP_HOST=127.0.0.1
|
|
STOCK_BOT_ALLOWED_ORIGINS=http://localhost:3000,http://127.0.0.1:3000
|
|
STOCK_BOT_AUTH_DISABLED=false
|
|
|
|
# QA PostgreSQL (existing container on port 5432)
|
|
POSTGRES_HOST=localhost
|
|
POSTGRES_PORT=5432
|
|
POSTGRES_DATABASE=trading_bot
|
|
POSTGRES_USERNAME=trading_user
|
|
POSTGRES_PASSWORD=trading_pass_dev
|
|
POSTGRES_SSL=false
|
|
DATABASE_POSTGRES_HOST=localhost
|
|
DATABASE_POSTGRES_PORT=5432
|
|
DATABASE_POSTGRES_DATABASE=trading_bot
|
|
DATABASE_POSTGRES_USER=trading_user
|
|
DATABASE_POSTGRES_PASSWORD=trading_pass_dev
|
|
|
|
# QA MongoDB (existing container on port 27017 - holds full ingested provider dataset)
|
|
MONGODB_HOST=localhost
|
|
MONGODB_PORT=27017
|
|
MONGODB_DATABASE=stock
|
|
MONGODB_USERNAME=trading_admin
|
|
MONGODB_PASSWORD=trading_mongo_dev
|
|
MONGODB_URI=mongodb://trading_admin:trading_mongo_dev@localhost:27017/stock?authSource=admin
|
|
# Optional: restrict QA data-pipeline to read-only MongoDB credentials too
|
|
# MONGODB_READ_URI=mongodb://studio_stock_bot_read:<QA_READ_PASSWORD>@localhost:27017/stock?authSource=stock
|
|
|
|
# QA Dragonfly / QuestDB / Queue
|
|
DRAGONFLY_HOST=localhost
|
|
DRAGONFLY_PORT=6379
|
|
QUESTDB_HOST=localhost
|
|
QUESTDB_PORT=9000
|
|
QUESTDB_HTTP_PORT=9000
|
|
QUESTDB_PG_PORT=8812
|
|
QUESTDB_ILP_PORT=9009
|
|
QUEUE_ENABLE_SCHEDULED_JOBS=true
|
|
|
|
# DuckDB per-worker budget on quant (prevents default 80% host-RAM allocation)
|
|
DUCKDB_MEMORY_LIMIT=6GB
|
|
DUCKDB_THREADS=4
|
|
DUCKDB_TEMP_DIR=/mnt/data/stockbot/tmp/duckdb
|