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>
38 lines
991 B
YAML
38 lines
991 B
YAML
services:
|
|
backend:
|
|
build: ./backend
|
|
security_opt:
|
|
- apparmor=unconfined
|
|
environment:
|
|
- DATABASE_URL=${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}
|
|
- APP_SLUG=reports
|
|
- OFFICE_IP_CHECK=${OFFICE_IP_CHECK:-disabled}
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:3001/health || exit 1"]
|
|
interval: 10s
|
|
retries: 5
|
|
start_period: 20s
|
|
restart: unless-stopped
|
|
|
|
frontend:
|
|
build:
|
|
context: ./frontend
|
|
args:
|
|
VITE_HOTEL_NAME: ${VITE_HOTEL_NAME}
|
|
security_opt:
|
|
- apparmor=unconfined
|
|
ports:
|
|
- "${FRONTEND_PORT:-3080}:80"
|
|
depends_on:
|
|
backend:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
|
|
networks:
|
|
default:
|
|
driver: bridge
|