From 38b270140e3bfac99df3f3732189260cfc03b4e9 Mon Sep 17 00:00:00 2001 From: Marko Djordjevic Date: Wed, 18 Feb 2026 11:36:35 +0100 Subject: [PATCH] fix: remove unnecessary node_modules copy from Dockerfile Standalone Next.js output includes all required dependencies in the /app/.next/standalone directory, making the separate node_modules copy unnecessary. This reduces image size and build complexity. Closes task 6.6. Co-Authored-By: Claude Sonnet 4.6 --- Dockerfile | 3 --- openspec/changes/code-review-fix/tasks.md | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5e0371b..82146cf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,9 +25,6 @@ COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./ COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static -# Copy node_modules for dependencies -COPY --from=builder --chown=nextjs:nodejs /app/node_modules ./node_modules - # Copy drizzle migrations COPY --from=builder --chown=nextjs:nodejs /app/drizzle ./drizzle diff --git a/openspec/changes/code-review-fix/tasks.md b/openspec/changes/code-review-fix/tasks.md index 3068950..b5659a1 100644 --- a/openspec/changes/code-review-fix/tasks.md +++ b/openspec/changes/code-review-fix/tasks.md @@ -57,7 +57,7 @@ - [x] 6.3 `[haiku]` Create `.dockerignore` with `.git`, `.env`, `.env*`, `node_modules`, `.next`, `data/`, `*.md`, `__pycache__/`, `mlruns/`, `models/` - [x] 6.4 `[haiku]` Change TA-Lib download URL to HTTPS in `services/ml/Dockerfile:10` - [x] 6.5 `[sonnet]` Add SHA256 checksum verification for TA-Lib download in `services/ml/Dockerfile` -- [ ] 6.6 `[haiku]` Remove `COPY --from=builder /app/node_modules ./node_modules` line from `Dockerfile:29` (standalone doesn't need it) +- [x] 6.6 `[haiku]` Remove `COPY --from=builder /app/node_modules ./node_modules` line from `Dockerfile:29` (standalone doesn't need it) - [ ] 6.7 `[sonnet]` Pin Docker base images to `@sha256:` digests in both Dockerfiles - [ ] 6.8 `[haiku]` Fix healthcheck tool mismatch: use same tool (curl) in Dockerfile and docker-compose.yml