Fix build: Bundle schwab_scraper source and use local dependencies
All checks were successful
Build and Push Docker Image / build (push) Successful in 34s
All checks were successful
Build and Push Docker Image / build (push) Successful in 34s
This commit is contained in:
28
Dockerfile
28
Dockerfile
@@ -4,29 +4,13 @@ ENV UV_COMPILE_BYTECODE=1 UV_LINK_MODE=copy
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Install git for dependency installation
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
git \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
# Copy dependency files and install
|
||||
COPY pyproject.toml uv.lock ./
|
||||
RUN uv sync --frozen --no-dev --no-install-project
|
||||
|
||||
# Use Gitea PAT for private dependencies if provided
|
||||
ARG GITEA_TOKEN
|
||||
RUN if [ -n "$GITEA_TOKEN" ]; then \
|
||||
git config --global url."https://${GITEA_TOKEN}@gitea.ext.ben.io/".insteadOf "https://gitea.ext.ben.io/"; \
|
||||
fi
|
||||
|
||||
# Install dependencies
|
||||
RUN --mount=type=cache,target=/root/.cache/uv \
|
||||
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
|
||||
--mount=type=bind,source=uv.lock,target=uv.lock \
|
||||
uv sync --frozen --no-install-project --no-dev
|
||||
|
||||
# Copy the rest of the application
|
||||
COPY . /app
|
||||
|
||||
# Install the project
|
||||
RUN --mount=type=cache,target=/root/.cache/uv \
|
||||
uv sync --frozen --no-dev
|
||||
# Copy project files
|
||||
COPY . .
|
||||
RUN uv sync --frozen --no-dev
|
||||
|
||||
FROM python:3.12-slim-bookworm
|
||||
|
||||
|
||||
Reference in New Issue
Block a user