fix: Handle missing package-lock.json in Docker build

Changed Dockerfile to conditionally use npm ci or npm install
depending on whether package-lock.json exists. This makes the
build more flexible while still preferring npm ci for
reproducibility when a lock file is available.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-06 08:08:34 -05:00
parent 287284c2fe
commit 648731f347

View File

@@ -9,7 +9,8 @@ WORKDIR /app
COPY package*.json ./
# Install dependencies (including devDependencies for build)
RUN npm ci
# Use npm ci if package-lock.json exists, otherwise use npm install
RUN if [ -f package-lock.json ]; then npm ci; else npm install; fi
# ======================
# Stage 2: Builder