Some checks failed
Build and Push Docker Image / build (push) Failing after 34s
- Update schwab-scraper to f52774b (optimized lot extraction polling, faster account switching with selector-based waits) - Install curl in Docker image so compose healthcheck works - Remove bundled schwab_scraper/ source (now installed via git dep) - Increase memory limit to 512M for large account position scraping
33 lines
675 B
Docker
33 lines
675 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 dependency files and install
|
|
COPY pyproject.toml uv.lock ./
|
|
RUN uv sync --frozen --no-dev --no-install-project
|
|
|
|
# Copy project files
|
|
COPY . .
|
|
RUN uv sync --frozen --no-dev
|
|
|
|
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 the environment from the builder
|
|
COPY --from=builder /app /app
|
|
|
|
# Set up environment variables
|
|
ENV PATH="/app/.venv/bin:$PATH"
|
|
ENV PORT=8000
|
|
|
|
# Expose the port
|
|
EXPOSE 8000
|
|
|
|
# Run the server
|
|
CMD ["python", "server.py"]
|