From b7b4dcf40c318afb0444b6c8ceaddacb0806f7b7 Mon Sep 17 00:00:00 2001 From: Med Marrouchi Date: Tue, 28 Jan 2025 08:17:09 +0100 Subject: [PATCH] update docker file --- Dockerfile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index e167dce..ffb7055 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,6 +14,8 @@ COPY --from=base /app ./ # Step 2: Copy the new project dependencies (generated by Hexabot CLI) COPY package.json ./package.extra.json +RUN node add-extra-deps.js + # Step 3: Install dependencies for both Hexabot API and new project RUN npm i --package-lock @@ -55,17 +57,15 @@ FROM node:18-alpine AS production WORKDIR /app -# Step 8: Copy necessary files from builder stage for production -COPY package.json ./package.extra.json - -RUN node add-extra-deps.js +# Step 1: Copy necessary files from builder stage for production +COPY --from=builder /app/package*.json ./ COPY --from=builder /app/patches ./patches -# Step 9: Install only production dependencies -RUN npm i --package-lock --only=production +# Step 2: Install only production dependencies +RUN npm i --only=production -# Step 10: Copy the built application from builder +# Step 3: Copy the built application from builder COPY --from=builder /app/dist ./dist # Set environment for production