Fix docker build order (#6354)

This commit is contained in:
Andrey Sobolev 2024-08-20 09:45:26 +07:00 committed by GitHub
parent 3d7a16ae49
commit 895a2b1bf6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View File

@ -2,7 +2,6 @@ FROM node:20
WORKDIR /usr/src/app
COPY bundle/bundle.js ./
RUN npm install --ignore-scripts=false --verbose bufferutil utf-8-validate @mongodb-js/zstd snappy --unsafe-perm
RUN apt-get update
@ -11,5 +10,7 @@ RUN apt-get install libjemalloc2
ENV LD_PRELOAD=libjemalloc.so.2
ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true
COPY bundle/bundle.js ./
EXPOSE 3000
CMD [ "node", "bundle.js" ]

View File

@ -10,9 +10,9 @@ RUN apt-get install libjemalloc2
ENV LD_PRELOAD=libjemalloc.so.2
ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true
RUN mv node_modules/uWebSockets.js/*.node .
COPY bundle/bundle.js ./
COPY bundle/bundle.js.map ./
RUN mv node_modules/uWebSockets.js/*.node .
EXPOSE 8080
ENV UWS_HTTP_MAX_HEADERS_SIZE 32768