Skip to content

Commit

Permalink
🐋 fix(Dockerfile): Optimize client build by caching npm install step
Browse files Browse the repository at this point in the history
  • Loading branch information
ochen1 authored and danny-avila committed Apr 3, 2024
1 parent e3c236b commit e27f901
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Dockerfile.multi
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ RUN npm run build
# React client build
FROM data-provider-build AS client-build
WORKDIR /app/client
COPY ./client/package*.json ./
RUN npm install
COPY ./client/ ./
# Copy data-provider to client's node_modules
RUN mkdir -p /app/client/node_modules/librechat-data-provider/
RUN cp -R /app/packages/data-provider/* /app/client/node_modules/librechat-data-provider/
RUN npm install
ENV NODE_OPTIONS="--max-old-space-size=2048"
RUN npm run build

Expand Down

0 comments on commit e27f901

Please sign in to comment.