From 899cacb2038e8f81219bc2af9d8ae0f0c66ff328 Mon Sep 17 00:00:00 2001 From: Leon Serfaty <80597822+silkoserfo@users.noreply.github.com> Date: Mon, 29 Jun 2026 02:50:38 -0400 Subject: [PATCH] Fix Docker build: install devDeps (vite/tsx) and use Node 22 npm ci ran with NODE_ENV=production (Coolify build arg) which skipped devDeps, so vite was missing. Force --include=dev. Bump base image to node:22. Co-Authored-By: Claude Opus 4.8 --- Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 43c89bf..b4088ec 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ # Builds the Vite frontend and runs the Express backend, which serves both the # API (/api), uploaded files (/storage), and the built frontend (SPA). -FROM node:20-bookworm-slim +FROM node:22-bookworm-slim WORKDIR /app @@ -11,8 +11,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates && rm -rf /var/lib/apt/lists/* # Install dependencies (full install — tsx/vite are needed for build & runtime) +# --include=dev: build needs vite/tsx (devDeps); Coolify sets NODE_ENV=production +# during build which would otherwise skip them. COPY package.json package-lock.json .npmrc ./ -RUN npm ci --legacy-peer-deps +RUN npm ci --include=dev --legacy-peer-deps # Copy source and build the frontend COPY . .