mirror of
https://github.com/Xe138/AI-Trader.git
synced 2026-04-06 18:57:25 -04:00
fix: prevent restart loop on missing API keys
Add validation at startup to check required environment variables: - OPENAI_API_KEY - ALPHAADVANTAGE_API_KEY - JINA_API_KEY If any are missing, display clear error message with setup instructions and exit immediately (no restart loop). Change restart policy from 'unless-stopped' to 'on-failure:3' to limit restart attempts and prevent endless loops on configuration errors.
This commit is contained in:
@@ -34,4 +34,4 @@ services:
|
||||
- "${TRADE_HTTP_PORT:-8002}:8002"
|
||||
- "${GETPRICE_HTTP_PORT:-8003}:8003"
|
||||
- "${WEB_HTTP_PORT:-8888}:8888"
|
||||
restart: unless-stopped
|
||||
restart: on-failure:3 # Restart max 3 times on failure, prevents endless loops
|
||||
|
||||
Reference in New Issue
Block a user