2023-12-04 16:03:21 +00:00
|
|
|
FROM node:20
|
2021-08-28 21:28:46 +00:00
|
|
|
|
2024-07-27 15:04:21 +00:00
|
|
|
WORKDIR /usr/src/app
|
2024-08-20 12:39:12 +00:00
|
|
|
RUN npm install --ignore-scripts=false --verbose bufferutil utf-8-validate @mongodb-js/zstd snappy msgpackr msgpackr-extract --unsafe-perm
|
2024-08-15 10:30:25 +00:00
|
|
|
RUN npm install --ignore-scripts=false --verbose uNetworking/uWebSockets.js#v20.47.0
|
2021-08-28 21:28:46 +00:00
|
|
|
|
2024-06-18 11:33:44 +00:00
|
|
|
RUN apt-get update
|
|
|
|
RUN apt-get install libjemalloc2
|
|
|
|
|
|
|
|
ENV LD_PRELOAD=libjemalloc.so.2
|
|
|
|
ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true
|
|
|
|
|
2024-08-20 02:45:26 +00:00
|
|
|
RUN mv node_modules/uWebSockets.js/*.node .
|
2024-02-12 16:57:11 +00:00
|
|
|
COPY bundle/bundle.js ./
|
2024-07-27 15:04:21 +00:00
|
|
|
COPY bundle/bundle.js.map ./
|
2021-08-28 21:28:46 +00:00
|
|
|
|
|
|
|
EXPOSE 8080
|
2024-05-06 09:15:39 +00:00
|
|
|
ENV UWS_HTTP_MAX_HEADERS_SIZE 32768
|
2024-08-20 12:39:12 +00:00
|
|
|
CMD node --enable-source-maps --inspect=0.0.0.0:9229 bundle.js
|