Python FastAPI ML backend kept intact; auth replaced with central hnf_session cookie verification. Frontend rebuilt on React 18 + TS + Vite with stack design system, Plotly charts retained. Shared Postgres via DATABASE_URL; schema applied on startup. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
32 lines
836 B
Docker
32 lines
836 B
Docker
FROM python:3.11-slim
|
|
|
|
WORKDIR /app
|
|
|
|
RUN apt-get update && apt-get install -y \
|
|
build-essential \
|
|
libpq-dev \
|
|
postgresql-client \
|
|
g++ \
|
|
make \
|
|
curl \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Playwright + Chromium for Booking.com scraper
|
|
RUN playwright install chromium --with-deps
|
|
|
|
# CmdStan for Prophet
|
|
RUN python -m cmdstanpy.install_cmdstan --cores 2
|
|
|
|
# Fix Prophet cmdstan path symlink
|
|
RUN CMDSTAN_VERSION=$(ls /root/.cmdstan/ | head -1) && \
|
|
rm -rf /usr/local/lib/python3.11/site-packages/prophet/stan_model/cmdstan-* && \
|
|
ln -s /root/.cmdstan/$CMDSTAN_VERSION /usr/local/lib/python3.11/site-packages/prophet/stan_model/cmdstan-2.31.0
|
|
|
|
COPY . .
|
|
|
|
EXPOSE 8000
|
|
|
|
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
|