From c9b85b79b771e9be2429b5b8a2ba28bd346a8797 Mon Sep 17 00:00:00 2001 From: Ryan Salazar Date: Mon, 1 Jun 2026 15:38:18 +0000 Subject: [PATCH] Dockerfile: npm install --include=dev to keep autoprefixer at build time Same fix that landed for RMP cold-build on 2026-05-30. Coolify passes NODE_ENV=production as a buildtime env (set on the app for runtime), which causes npm to skip devDependencies and Next.js's PostCSS pipeline can't load autoprefixer. --- Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 50a9927..43615b2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,11 @@ ENV NEXT_PUBLIC_SITE_URL=$NEXT_PUBLIC_SITE_URL ENV NEXT_PUBLIC_GA_MEASUREMENT_ID=$NEXT_PUBLIC_GA_MEASUREMENT_ID COPY package*.json ./ -RUN npm install +# Force dev-deps even if NODE_ENV=production was supplied as a Coolify +# build arg — autoprefixer/postcss/tailwindcss live in devDependencies and +# Next.js needs them at build time. Same fix that landed for RMP cold-build +# on 2026-05-30. +RUN npm install --include=dev COPY . . RUN npm run build ENV NODE_ENV=production