Lockfiles + npm ci en Dockerfiles
- package-lock.json en backend y frontend (lockfileVersion 3). - Dockerfiles ahora copian el lockfile y usan `npm ci` en vez de `npm install` para builds reproducibles.
This commit is contained in:
1 parent
2b2982eff4
commit
f385ce709b
4 files changed
+3298
-4
No files matched your search
+2
-2
@@ -3,8 +3,8 @@ FROM node:20-slim
|
||||
WORKDIR /app
|
||||
|
||||
# Dependencias primero (mejor cacheo de capas)
|
||||
COPY package.json ./
|
||||
RUN npm install --omit=dev
|
||||
COPY package.json package-lock.json ./
|
||||
RUN npm ci --omit=dev
|
||||
|
||||
# Código
|
||||
COPY server.js schema.sql ./
|
||||
|
||||
Generated
+1604
File diff suppressed because it is too large.
Load diff
+2
-2
@@ -1,8 +1,8 @@
|
||||
# ── Etapa 1: build del frontend ──
|
||||
FROM node:20-slim AS build
|
||||
WORKDIR /app
|
||||
COPY package.json ./
|
||||
RUN npm install
|
||||
COPY package.json package-lock.json ./
|
||||
RUN npm ci
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
|
||||
Generated
+1690
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user