From d41e8159d0a25b25104acdcb75f98e61a2d23866 Mon Sep 17 00:00:00 2001 From: "cartsnitch-ci[bot]" Date: Tue, 31 Mar 2026 00:37:17 +0000 Subject: [PATCH] fix(api): use repo-root-relative paths in Dockerfile for context: . The CI build-and-push-api job uses context: . (repo root), so all COPY paths must be relative to the repo root, not the api/ directory. Also installs ./common/ alongside the api package, matching the receiptwitness Dockerfile pattern. Co-Authored-By: Paperclip --- api/Dockerfile | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/api/Dockerfile b/api/Dockerfile index 8eef88d..d10debc 100644 --- a/api/Dockerfile +++ b/api/Dockerfile @@ -5,19 +5,21 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ build-essential \ && rm -rf /var/lib/apt/lists/* +# Build context is the repo root. These paths are relative to the root. WORKDIR /app -COPY pyproject.toml ./ -COPY src/ ./src/ -RUN pip install --no-cache-dir --prefix=/install . +COPY api/pyproject.toml ./ +COPY api/src/ ./src/ +COPY common/ ./common/ +RUN pip install --no-cache-dir --prefix=/install ./common/ . 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