Files
schwab-mcp-custom/Dockerfile
b3nw 89bb29e563
Some checks failed
Build and Push Docker Image / build (push) Failing after 39s
v0.2.0 — remove vendored fork, upstream login feature
- Delete vendor/schwab-scraper/ (now fetched at CI build time)
- Delete schwab_mcp_custom/ package (LoginManager moved into server.py)
- server.py: add inline LoginManager with env-configurable rate limits
- server.py: orchestrate login safety checks at MCP layer, not in scraper
- Dockerfile: restore vendor-based build with fresh upstream checkout
- pyproject.toml: bump mcp>=1.27.0, playwright>=1.54.0
2026-04-28 00:36:46 +00:00

36 lines
959 B
Docker

FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim AS builder
ENV UV_COMPILE_BYTECODE=1 UV_LINK_MODE=copy
WORKDIR /app
# Copy vendored schwab-scraper (checked out cleanly by CI) and pyproject.toml
COPY vendor/schwab-scraper /tmp/schwab-scraper
COPY pyproject.toml uv.lock ./
# Install schwab-scraper from the clean build-time checkout, then remaining deps.
# We strip the git dependency line so uv doesn't try to fetch over the network.
RUN uv venv && \
uv pip install /tmp/schwab-scraper && \
sed -i '/schwab-scraper/d' pyproject.toml && \
uv pip install -r pyproject.toml && \
uv pip install --upgrade playwright && \
rm -rf /tmp/schwab-scraper
COPY . .
FROM python:3.12-slim-bookworm
RUN apt-get update && \
apt-get install -y --no-install-recommends curl && \
rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY --from=builder /app /app
ENV PATH="/app/.venv/bin:$PATH"
ENV PORT=8000
EXPOSE 8000
CMD ["python", "server.py"]