# Foxhunt Configuration Safety - Production Environment Variables # This file demonstrates the required environment variables for production deployment # after eliminating hardcoded localhost references # ============================================================================= # ENVIRONMENT CONFIGURATION # ============================================================================= FOXHUNT_ENV=production # ============================================================================= # SERVICE DISCOVERY & NETWORKING # ============================================================================= # Core service host (required in production) SERVICE_HOST=foxhunt.internal # Alternative for Kubernetes environments KUBERNETES_SERVICE_HOST=foxhunt.default.svc.cluster.local # ============================================================================= # DATABASE CONFIGURATION # ============================================================================= # PostgreSQL Configuration DATABASE_HOST=foxhunt-postgres.internal DATABASE_URL=postgresql://foxhunt:${DB_PASSWORD}@${DATABASE_HOST}:5432/foxhunt DB_USERNAME=foxhunt DB_PASSWORD= # Redis Configuration REDIS_HOST=foxhunt-redis.internal REDIS_URL=redis://${REDIS_HOST}:6379 # InfluxDB Configuration INFLUXDB_HOST=foxhunt-influx.internal INFLUXDB_URL=http://${INFLUXDB_HOST}:8086 INFLUXDB_USERNAME=foxhunt INFLUXDB_PASSWORD= # ClickHouse Configuration (optional) CLICKHOUSE_HOST=foxhunt-clickhouse.internal CLICKHOUSE_URL=http://${CLICKHOUSE_HOST}:8123 # ============================================================================= # BROKER CONFIGURATION # ============================================================================= # Interactive Brokers IB_HOST=ib-gateway.internal IB_REST_URL=http://${IB_HOST}:7497 IB_WS_URL=ws://${IB_HOST}:7497 # General Broker Host BROKER_HOST=foxhunt-brokers.internal # ============================================================================= # SECURITY CONFIGURATION # ============================================================================= # Database Access Control DB_ALLOWED_IPS=10.0.0.0/8,172.16.0.0/12,192.168.0.0/16 DB_FIREWALL_RULES=ALLOW 10.0.0.0/8,ALLOW 172.16.0.0/12,DENY ALL # ============================================================================= # SERVICE-SPECIFIC ENDPOINTS # ============================================================================= # Core Services (will use SERVICE_HOST + port if not specified) TRADING_ENGINE_ENDPOINT=http://trading-engine.${SERVICE_HOST}:50051 MARKET_DATA_ENDPOINT=http://market-data.${SERVICE_HOST}:50052 RISK_MANAGEMENT_ENDPOINT=http://risk-management.${SERVICE_HOST}:50053 BROKER_CONNECTOR_ENDPOINT=http://broker-connector.${SERVICE_HOST}:50054 AI_INTELLIGENCE_ENDPOINT=http://ai-intelligence.${SERVICE_HOST}:50055 PERSISTENCE_ENDPOINT=http://persistence.${SERVICE_HOST}:50056 INTEGRATION_HUB_ENDPOINT=http://integration-hub.${SERVICE_HOST}:50057 BACKTESTING_ENDPOINT=http://backtesting.${SERVICE_HOST}:50058 PIPELINE_COORDINATOR_ENDPOINT=http://pipeline-coordinator.${SERVICE_HOST}:50059 DATA_AGGREGATOR_ENDPOINT=http://data-aggregator.${SERVICE_HOST}:50060 MULTI_ASSET_TRADING_ENDPOINT=http://multi-asset-trading.${SERVICE_HOST}:50061 ML_DATA_PIPELINE_ENDPOINT=http://ml-data-pipeline.${SERVICE_HOST}:50062 SECURITY_SERVICE_ENDPOINT=http://security-service.${SERVICE_HOST}:50063 TRADING_WORKFLOW_ENDPOINT=http://trading-workflow.${SERVICE_HOST}:50064 BROKER_EXECUTION_ENDPOINT=http://broker-execution.${SERVICE_HOST}:50065 # ============================================================================= # MONITORING & OBSERVABILITY # ============================================================================= PROMETHEUS_ENDPOINT=http://prometheus.internal:9090 GRAFANA_ENDPOINT=http://grafana.internal:3000 HEALTH_CHECK_ENDPOINT=http://health.${SERVICE_HOST}:8080 # Service Discovery SERVICE_DISCOVERY_ENABLED=true SERVICE_DISCOVERY_ENDPOINT=http://consul.internal:8500 # ============================================================================= # TRADING CONFIGURATION # ============================================================================= TRADING_MODE=live MAX_POSITION_SIZE_PCT=0.10 HTTP_PORT=8080 # Risk Management RISK_MAX_DAILY_LOSS=50000 RISK_MAX_POSITION_VALUE=100000 # ============================================================================= # REQUIRED FOR LIVE TRADING # ============================================================================= BROKER_API_KEY= BROKER_SECRET_KEY= VAULT_ADDR=https://vault.internal:8200 # ============================================================================= # NOTES # ============================================================================= # 1. All localhost/127.0.0.1 references have been eliminated # 2. Production environment will panic if SERVICE_HOST or DATABASE_HOST not set # 3. Use internal domain names or IP addresses appropriate for your network # 4. Secrets should be managed through proper secret management systems # 5. This configuration ensures no hardcoded values reach production