chore: Dockerfile node:22-alpine + npm install (alignement recette)
This commit is contained in:
@@ -6,7 +6,7 @@ FROM node:22-alpine AS frontend-build
|
|||||||
WORKDIR /app/frontend
|
WORKDIR /app/frontend
|
||||||
|
|
||||||
# Copy package files
|
# Copy package files
|
||||||
COPY frontend/package.json frontend/pnpm-lock.yaml* frontend/yarn.lock* frontend/package-lock.json* ./
|
COPY frontend/package.json frontend/package-lock.json ./
|
||||||
|
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
RUN npm install --legacy-peer-deps
|
RUN npm install --legacy-peer-deps
|
||||||
@@ -25,7 +25,7 @@ FROM node:22-alpine AS backend-build
|
|||||||
WORKDIR /app/backend
|
WORKDIR /app/backend
|
||||||
|
|
||||||
# Copy package files
|
# Copy package files
|
||||||
COPY backend/package.json backend/pnpm-lock.yaml* backend/yarn.lock* backend/package-lock.json* ./
|
COPY backend/package.json backend/package-lock.json ./
|
||||||
|
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
RUN npm install --legacy-peer-deps
|
RUN npm install --legacy-peer-deps
|
||||||
@@ -66,7 +66,7 @@ ENV UPLOAD_DIR=/app/uploads
|
|||||||
EXPOSE 3001
|
EXPOSE 3001
|
||||||
|
|
||||||
# Health check
|
# Health check
|
||||||
HEALTHCHECK --interval=30s --timeout=10s --start-period=10s --retries=3 \
|
HEALTHCHECK --interval=30s --timeout=10s --start-period=15s --retries=3 \
|
||||||
CMD curl -f http://localhost:3001/api/health || exit 1
|
CMD curl -f http://localhost:3001/api/health || exit 1
|
||||||
|
|
||||||
# Start the application
|
# Start the application
|
||||||
|
|||||||
@@ -4,10 +4,10 @@ FROM node:22-alpine
|
|||||||
WORKDIR /app/backend
|
WORKDIR /app/backend
|
||||||
|
|
||||||
# Copy package files
|
# Copy package files
|
||||||
COPY backend/package.json backend/pnpm-lock.yaml* backend/yarn.lock* backend/package-lock.json* ./
|
COPY backend/package.json backend/package-lock.json ./
|
||||||
|
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
RUN npm install --legacy-peer-deps
|
RUN npm ci --legacy-peer-deps
|
||||||
|
|
||||||
# Copy source code
|
# Copy source code
|
||||||
COPY backend/ ./
|
COPY backend/ ./
|
||||||
|
|||||||
Reference in New Issue
Block a user