Skip to content

Commit b7b4dcf

Browse files
marrouchiMohamedAliBouhaouala
authored andcommitted
update docker file
1 parent 8b7e1d6 commit b7b4dcf

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Dockerfile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ COPY --from=base /app ./
1414
# Step 2: Copy the new project dependencies (generated by Hexabot CLI)
1515
COPY package.json ./package.extra.json
1616

17+
RUN node add-extra-deps.js
18+
1719
# Step 3: Install dependencies for both Hexabot API and new project
1820
RUN npm i --package-lock
1921

@@ -55,17 +57,15 @@ FROM node:18-alpine AS production
5557

5658
WORKDIR /app
5759

58-
# Step 8: Copy necessary files from builder stage for production
59-
COPY package.json ./package.extra.json
60-
61-
RUN node add-extra-deps.js
60+
# Step 1: Copy necessary files from builder stage for production
61+
COPY --from=builder /app/package*.json ./
6262

6363
COPY --from=builder /app/patches ./patches
6464

65-
# Step 9: Install only production dependencies
66-
RUN npm i --package-lock --only=production
65+
# Step 2: Install only production dependencies
66+
RUN npm i --only=production
6767

68-
# Step 10: Copy the built application from builder
68+
# Step 3: Copy the built application from builder
6969
COPY --from=builder /app/dist ./dist
7070

7171
# Set environment for production

0 commit comments

Comments
 (0)