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:
2025-10-30 21:00:12 -04:00
parent 0c58baed42
commit 4666e09385
2 changed files with 35 additions and 1 deletions

View File

@@ -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