fix(deploy): fallback to npm install when lockfile missing in Dockerfiles
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
FROM node:20-alpine AS builder
|
||||
WORKDIR /app
|
||||
COPY frontend/package*.json ./
|
||||
RUN npm ci
|
||||
# Use npm ci when lockfile exists, fallback to npm install
|
||||
RUN sh -c 'if [ -f package-lock.json ] || [ -f npm-shrinkwrap.json ]; then npm ci; else npm install; fi'
|
||||
COPY frontend/ ./
|
||||
RUN npm run build --prefix frontend
|
||||
|
||||
|
Reference in New Issue
Block a user