From c65b225ba7da85a59929cfb4fc8d2f785ad61f45 Mon Sep 17 00:00:00 2001 From: "Arjun (OpenClaw)" Date: Sat, 7 Feb 2026 15:57:25 +0000 Subject: [PATCH] fix: dockerfiles build in compose context - backend: copy dependency lockfiles from backend/ when build context is repo root - frontend: don't copy public/ when it doesn't exist --- backend/Dockerfile | 3 ++- frontend/Dockerfile | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index 6e0a28e5..9fc59a1c 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -20,7 +20,8 @@ ENV PATH="/root/.local/bin:${PATH}" FROM base AS deps # Copy only dependency metadata first for better build caching -COPY pyproject.toml uv.lock ./ +# NOTE: compose builds backend with repo-root context, so files live under /backend. +COPY backend/pyproject.toml backend/uv.lock ./ # Create venv and sync deps (including runtime) RUN uv sync --frozen --no-dev diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 4a87dcd6..fb396bf9 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -28,7 +28,8 @@ ENV NODE_ENV=production ENV NEXT_PUBLIC_API_URL=http://localhost:8000 COPY --from=builder /app/.next ./.next -COPY --from=builder /app/public ./public +# `public/` is optional in Next.js apps; repo may not have it. +# Avoid failing the build when the directory is absent. COPY --from=builder /app/package.json ./package.json COPY --from=builder /app/node_modules ./node_modules COPY --from=builder /app/next.config.ts ./next.config.ts