FROM python:3.12-slim

WORKDIR /app

# PyPI is blocked on this China-based host; use the Tsinghua mirror.
COPY requirements.txt ./
RUN pip install --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt

COPY quantux_client.py quantux_auth.py quantux_export.py quantux_verify.py server.py ./

ENV QUX_BASE_URL=http://quant-ux-frontend:8082 \
    MCP_PORT=8090

EXPOSE 8090

CMD ["python", "-m", "uvicorn", "server:app", "--host", "0.0.0.0", "--port", "8090"]
