FROM node:22.20.0-bookworm-slim@sha256:b21fe589dfbe5cc39365d0544b9be3f1f33f55f3c86c87a76ff65a02f8f5848e AS playwright
RUN npm install --prefix /opt/playwright-mcp @playwright/mcp@0.0.83

FROM python:3.12.14-bookworm@sha256:dbbe4ceb97851e2e5fa83798b239811f871cb743b259ba3563737349f6bcfaa0
ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
COPY --from=playwright /usr/local/bin/node /usr/local/bin/node
COPY --from=playwright /opt/playwright-mcp /opt/playwright-mcp
RUN /opt/playwright-mcp/node_modules/.bin/playwright install --with-deps chromium && \
    apt-get clean && rm -rf /var/lib/apt/lists/*

CMD ["tail", "-f", "/dev/null"]

RUN mkdir -p /workspace
WORKDIR /workspace

RUN pip install pandas==2.2.3
RUN pip install openpyxl==3.1.5

RUN mkdir -p /utils
COPY actual_spending.xlsx /utils/actual_spending.xlsx
COPY budget.xlsx /utils/budget.xlsx
