From c3e7a14c9c82d86cbe01cd23d017e4f9990ae24b Mon Sep 17 00:00:00 2001 From: "cartsnitch-ci[bot]" Date: Tue, 31 Mar 2026 01:09:16 +0000 Subject: [PATCH] fix(api): correct COPY paths in Dockerfile for monorepo build context The api/Dockerfile used bare paths (COPY pyproject.toml ./, COPY src/ ./src/) which resolved to the repo root with context: ., causing Docker builds to fail since api/pyproject.toml and api/src/ don't exist at the repo root. Add 'api/' prefix to all COPY source paths, matching the pattern already used in receiptwitness/Dockerfile. Co-Authored-By: Paperclip --- Dockerfile | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8eef88d..0c5b700 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,5 @@ +# Stage 1: Build dependencies +# Build context is the repo root. Paths below are relative to the root. FROM python:3.12-slim AS build RUN apt-get update && apt-get install -y --no-install-recommends \ @@ -6,18 +8,19 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && rm -rf /var/lib/apt/lists/* WORKDIR /app -COPY pyproject.toml ./ -COPY src/ ./src/ +COPY api/pyproject.toml ./ +COPY api/src/ ./src/ RUN pip install --no-cache-dir --prefix=/install . +# Stage 2: Production image FROM python:3.12-slim AS prod WORKDIR /app RUN adduser --system --group --uid 1000 app COPY --from=build /install /usr/local -COPY src/ ./src/ -COPY alembic.ini ./ -COPY alembic/ ./alembic/ +COPY api/src/ ./src/ +COPY api/alembic.ini ./ +COPY api/alembic/ ./alembic/ USER 1000 EXPOSE 8000