Switch Directors Forecast to use forecasting API instead of direct DB

Replace queryForecast/forecast-db.js with fetch() calls to the
forecasting app's public API (/forecasting/api/public/forecast/revenue
and /forecast/rooms). This removes the need for cross-DB grants and the
FORECAST_DATABASE_URL — all data comes from FORECASTING_API_KEY +
FORECASTING_URL. The DOW-history algorithm is also removed since the
covers model in the forecasting API already handles dry/wet future
forecasts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
jtricerolph 2026-07-20 10:36:08 +00:00
parent 018957123f
commit bd9ddbeda9
2 changed files with 119 additions and 157 deletions

View file

@ -5,7 +5,8 @@ services:
- apparmor=unconfined
environment:
- DATABASE_URL=${DATABASE_URL}
- FORECAST_DATABASE_URL=${FORECAST_DATABASE_URL:-}
- FORECASTING_URL=${FORECASTING_URL:-http://10.10.10.113:3080}
- FORECASTING_API_KEY=${FORECASTING_API_KEY:-}
- CENTRAL_AUTH_SECRET=${CENTRAL_AUTH_SECRET}
- SETTINGS_URL=${SETTINGS_URL}
- SETTINGS_SECRET=${SETTINGS_SECRET}