From 3ae9add947ca4964f8388f26fd87d34b8294b02a Mon Sep 17 00:00:00 2001 From: Linus Olofsson <61837116+LinusOlofsson-maker@users.noreply.github.com> Date: Wed, 20 May 2026 21:58:21 +0200 Subject: [PATCH] fix: fallback to npm install when lockfile missing (#6) package-lock.json is .gitignored so npm ci fails in Coolify build. Use npm install as fallback when lockfile not present. --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 3c14e87..0ea94f8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,8 @@ FROM node:22-alpine AS builder WORKDIR /app COPY package.json package-lock.json* ./ -RUN --mount=type=cache,target=/root/.npm npm ci +RUN --mount=type=cache,target=/root/.npm \ + if [ -f package-lock.json ]; then npm ci; else npm install --no-audit --no-fund; fi COPY . . RUN npm run build