- Point Ollama to local instance via host.docker.internal, use gemma3 model - Remove Docker Ollama service (using host's Ollama instead) - Add company-name-to-ticker mapping (Apple→AAPL, Tesla→TSLA, etc.) for RSS articles - Lower signal thresholds for faster feedback with paper trading: - FinBERT confidence: 0.6→0.4, signal strength: 0.3→0.15 - News strategy: article_count 2→1, confidence 0.5→0.3, score ±0.3→±0.15 - Fix market data BarSet access bug (BarSet.__contains__ returns False incorrectly) - Fix market data SIP feed error by switching to IEX feed for free Alpaca accounts - Fix nginx proxy routing for /api/auth/* to api-gateway /auth/* - Add seed_sample_data script - Update tests for new thresholds and alpaca mock modules
75 lines
3 KiB
Nginx Configuration File
75 lines
3 KiB
Nginx Configuration File
# nginx configuration for the trading-bot dashboard.
|
|
# Serves the React SPA and proxies API / WebSocket requests to the api-gateway.
|
|
|
|
server {
|
|
listen 80;
|
|
server_name _;
|
|
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# SPA: serve index.html for any path not matching a static file
|
|
# ---------------------------------------------------------------------------
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Proxy /api/auth/* to the api-gateway /auth/* routes
|
|
# (Dashboard client uses baseURL=/api, so auth calls arrive as /api/auth/*)
|
|
# ---------------------------------------------------------------------------
|
|
location /api/auth/ {
|
|
proxy_pass http://api-gateway:8000/auth/;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
}
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Proxy /api/* to the api-gateway service
|
|
# ---------------------------------------------------------------------------
|
|
location /api/ {
|
|
proxy_pass http://api-gateway:8000/api/;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
}
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Proxy /auth/* to the api-gateway service
|
|
# ---------------------------------------------------------------------------
|
|
location /auth/ {
|
|
proxy_pass http://api-gateway:8000;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
}
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Proxy /health to the api-gateway service
|
|
# ---------------------------------------------------------------------------
|
|
location /health {
|
|
proxy_pass http://api-gateway:8000;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
}
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# WebSocket upgrade for /ws
|
|
# ---------------------------------------------------------------------------
|
|
location /ws {
|
|
proxy_pass http://api-gateway:8000;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_read_timeout 86400;
|
|
}
|
|
}
|