feat: Docker Compose avec Node.js pré-compilé pour déploiement sans npm
This commit is contained in:
10
Dockerfile
10
Dockerfile
@@ -2,17 +2,11 @@ FROM node:18-alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy npm config
|
||||
COPY .npmrc ./
|
||||
|
||||
# Copy package files
|
||||
COPY backend/package*.json ./
|
||||
|
||||
# Install dependencies - handle npm bug with explicit install
|
||||
RUN npm cache clean --force && \
|
||||
npm install --no-optional --legacy-peer-deps || true && \
|
||||
npm install express express-session bcryptjs dotenv cors multer fs-extra && \
|
||||
test -d node_modules/express || (ls -la node_modules/ && echo "FATAL: express not found" && exit 1)
|
||||
# Copy pre-built node_modules (already present)
|
||||
COPY backend/node_modules ./node_modules/
|
||||
|
||||
# Copy application code
|
||||
COPY backend/src ./src
|
||||
|
||||
Reference in New Issue
Block a user