stock-bot/.env
Boki 4cd6038063 refactor: pre-M0 cleanup, core library hardening, and isolated dev/QA Docker stack
- 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
2026-11-27 00:11:50 -05:00

180 lines
4.3 KiB
Bash

# ===========================================
# STOCK BOT PLATFORM - ENVIRONMENT VARIABLES
# ===========================================
# Core Application Settings
NODE_ENV=development
LOG_LEVEL=debug
LOG_HIDE_OBJECT=true
STOCK_BOT_ADMIN_TOKEN=ae8da49a63295865ff9e3d0b4ec012e3ccea73a56d3ff76ae6c7276d9d539ed3
STOCK_BOT_SERVICE_TOKEN=df6510947397dff96078f0b330c82779aff741583e862069c0e37a2be14a4f03
# Data Service Configuration
DATA_SERVICE_PORT=2001
# Queue and Worker Configuration
WORKER_COUNT=1
WORKER_CONCURRENCY=2
WEBSHARE_API_KEY=y8ay534rcbybdkk3evnzmt640xxfhy7252ce2t98
WEBSHARE_ROTATING_PROXY_URL=http://doimvbnb-rotate:w5fpiwrb9895@p.webshare.io:80/
WEBSHARE_API_URL=https://proxy.webshare.io/api/v2/
# ===========================================
# DATABASE CONFIGURATIONS
# ===========================================
# Dragonfly/Redis Configuration
DRAGONFLY_HOST=localhost
DRAGONFLY_PORT=6380
DRAGONFLY_PASSWORD=
# PostgreSQL Configuration
POSTGRES_HOST=localhost
POSTGRES_PORT=5433
POSTGRES_DATABASE=trading_bot_dev
POSTGRES_USERNAME=dev_user
POSTGRES_PASSWORD=dev_pass
POSTGRES_SSL=false
# QuestDB Configuration
QUESTDB_HOST=localhost
QUESTDB_PORT=9100
QUESTDB_DB=qdb
QUESTDB_USERNAME=admin
QUESTDB_PASSWORD=quest
# MongoDB Configuration
MONGODB_HOST=localhost
MONGODB_PORT=27018
MONGODB_DATABASE=stock_dev
MONGODB_USERNAME=dev_admin
MONGODB_PASSWORD=dev_mongo_pass
MONGODB_URI=mongodb://dev_admin:dev_mongo_pass@localhost:27018/stock_dev?authSource=admin
# ===========================================
# DATA PROVIDER CONFIGURATIONS
# ===========================================
# Proxy Configuration
PROXY_VALIDATION_HOURS=24
PROXY_BATCH_SIZE=100
PROXY_DIRECT_MODE=false
# Yahoo Finance (if using API keys)
YAHOO_API_KEY=
YAHOO_API_SECRET=
# QuoteMedia Configuration
QUOTEMEDIA_API_KEY=
QUOTEMEDIA_BASE_URL=https://api.quotemedia.com
# ===========================================
# TRADING PLATFORM INTEGRATIONS
# ===========================================
# Alpaca Trading
ALPACA_API_KEY=
ALPACA_SECRET_KEY=
ALPACA_BASE_URL=https://paper-api.alpaca.markets
ALPACA_PAPER_TRADING=true
# Polygon.io
POLYGON_API_KEY=
POLYGON_BASE_URL=https://api.polygon.io
# ===========================================
# RISK MANAGEMENT
# ===========================================
# Risk Management Settings
MAX_POSITION_SIZE=10000
MAX_DAILY_LOSS=1000
MAX_PORTFOLIO_EXPOSURE=0.8
STOP_LOSS_PERCENTAGE=0.02
TAKE_PROFIT_PERCENTAGE=0.05
# ===========================================
# MONITORING AND OBSERVABILITY
# ===========================================
# Prometheus Configuration
PROMETHEUS_HOST=localhost
PROMETHEUS_PORT=9090
PROMETHEUS_METRICS_PORT=9091
PROMETHEUS_PUSHGATEWAY_URL=http://localhost:9091
# Grafana Configuration
GRAFANA_HOST=localhost
GRAFANA_PORT=3000
GRAFANA_ADMIN_USER=admin
GRAFANA_ADMIN_PASSWORD=admin
# Loki Logging
LOKI_HOST=localhost
LOKI_PORT=3100
LOKI_URL=http://localhost:3100
# ===========================================
# CACHE CONFIGURATION
# ===========================================
# Cache Settings
CACHE_TTL=300
CACHE_MAX_ITEMS=10000
CACHE_ENABLED=true
# ===========================================
# SECURITY SETTINGS
# ===========================================
# JWT Configuration
JWT_SECRET=your-super-secret-jwt-key-change-this-in-production
JWT_EXPIRES_IN=24h
# API Rate Limiting
RATE_LIMIT_WINDOW=15
RATE_LIMIT_MAX_REQUESTS=100
# ===========================================
# DEVELOPMENT SETTINGS
# ===========================================
# Debug Settings
DEBUG_MODE=false
VERBOSE_LOGGING=false
# Development Tools
HOT_RELOAD=true
SOURCE_MAPS=true
# ===========================================
# DOCKER CONFIGURATION
# ===========================================
# Docker-specific settings (used in docker-compose)
DOCKER_BUILDKIT=1
# ===========================================
# MISCELLANEOUS
# ===========================================
# Timezone
TZ=UTC
# Application Metadata
APP_NAME="Stock Bot Platform"
APP_VERSION=1.0.0
APP_DESCRIPTION="Advanced Stock Trading and Analysis Platform"
# PostgreSQL
DATABASE_POSTGRES_HOST=localhost
DATABASE_POSTGRES_PORT=5433
DATABASE_POSTGRES_DATABASE=trading_bot_dev
DATABASE_POSTGRES_USER=dev_user
DATABASE_POSTGRES_PASSWORD=dev_pass
QUESTDB_HTTP_PORT=9100
QUESTDB_PG_PORT=8813
QUESTDB_ILP_PORT=9010
QUEUE_ENABLE_SCHEDULED_JOBS=false