Skip to content

Commit

Permalink
update docker file
Browse files Browse the repository at this point in the history
  • Loading branch information
marrouchi authored and MohamedAliBouhaouala committed Jan 28, 2025
1 parent 8b7e1d6 commit b7b4dcf
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b7b4dcf

Please sign in to comment.