diff --git a/pods/account/Dockerfile b/pods/account/Dockerfile index 0879745fff0..270607dfb8e 100644 --- a/pods/account/Dockerfile +++ b/pods/account/Dockerfile @@ -6,6 +6,7 @@ RUN npm install --ignore-scripts=false --verbose bufferutil utf-8-validate @mong RUN apt-get update RUN apt-get install libjemalloc2 +RUN apt-get clean ENV LD_PRELOAD=libjemalloc.so.2 ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true diff --git a/pods/backup/Dockerfile b/pods/backup/Dockerfile index 690eec79539..aab274c7863 100644 --- a/pods/backup/Dockerfile +++ b/pods/backup/Dockerfile @@ -4,6 +4,14 @@ FROM node:20 WORKDIR /usr/src/app RUN npm install --ignore-scripts=false --verbose bufferutil utf-8-validate @mongodb-js/zstd snappy --unsafe-perm + +RUN apt-get update +RUN apt-get install libjemalloc2 +RUN apt-get clean + +ENV LD_PRELOAD=libjemalloc.so.2 +ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true + COPY bundle/bundle.js ./ EXPOSE 3000 diff --git a/pods/collaborator/Dockerfile b/pods/collaborator/Dockerfile index 101ba427317..2f2ec250534 100644 --- a/pods/collaborator/Dockerfile +++ b/pods/collaborator/Dockerfile @@ -6,6 +6,7 @@ RUN npm install --ignore-scripts=false --verbose bufferutil utf-8-validate @mong RUN apt-get update RUN apt-get install libjemalloc2 +RUN apt-get clean ENV LD_PRELOAD=libjemalloc.so.2 ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true diff --git a/pods/front/Dockerfile b/pods/front/Dockerfile index acdf2ad0a78..d1dfeb5e714 100644 --- a/pods/front/Dockerfile +++ b/pods/front/Dockerfile @@ -7,6 +7,7 @@ RUN npm install --ignore-scripts=false --verbose sharp@v0.32.6 bufferutil utf-8- RUN apt-get update RUN apt-get install libjemalloc2 +RUN apt-get clean ENV LD_PRELOAD=libjemalloc.so.2 ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true diff --git a/pods/server/Dockerfile b/pods/server/Dockerfile index 938ff0edc25..20a45aca0cc 100644 --- a/pods/server/Dockerfile +++ b/pods/server/Dockerfile @@ -5,6 +5,7 @@ RUN npm install --ignore-scripts=false --verbose bufferutil utf-8-validate @mong RUN apt-get update RUN apt-get install libjemalloc2 +RUN apt-get clean ENV LD_PRELOAD=libjemalloc.so.2 ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true diff --git a/pods/workspace/Dockerfile b/pods/workspace/Dockerfile index 2e92c9497df..1086d64b386 100644 --- a/pods/workspace/Dockerfile +++ b/pods/workspace/Dockerfile @@ -6,6 +6,7 @@ RUN npm install --ignore-scripts=false --verbose bufferutil utf-8-validate @mong RUN apt-get update RUN apt-get install libjemalloc2 +RUN apt-get clean ENV LD_PRELOAD=libjemalloc.so.2 ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true diff --git a/server/collaborator/Dockerfile b/server/collaborator/Dockerfile index 20807f1330d..ce84366d90e 100644 --- a/server/collaborator/Dockerfile +++ b/server/collaborator/Dockerfile @@ -1,8 +1,15 @@ -FROM node:20-alpine +FROM node:20 WORKDIR /usr/src/app +RUN apt-get update +RUN apt-get install libjemalloc2 +RUN apt-get clean + +ENV LD_PRELOAD=libjemalloc.so.2 +ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true + COPY bundle/bundle.js ./ EXPOSE 3078 diff --git a/services/ai-bot/pod-ai-bot/Dockerfile b/services/ai-bot/pod-ai-bot/Dockerfile index aba9997f636..940ae9d1204 100644 --- a/services/ai-bot/pod-ai-bot/Dockerfile +++ b/services/ai-bot/pod-ai-bot/Dockerfile @@ -3,6 +3,13 @@ FROM node:20 WORKDIR /usr/src/app RUN npm install --ignore-scripts=false --verbose bufferutil utf-8-validate @mongodb-js/zstd snappy --unsafe-perm +RUN apt-get update +RUN apt-get install libjemalloc2 +RUN apt-get clean + +ENV LD_PRELOAD=libjemalloc.so.2 +ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true + COPY bundle/bundle.js ./ COPY assets/avatar.png ./ diff --git a/services/analytics-collector/pod-analytics-collector/Dockerfile b/services/analytics-collector/pod-analytics-collector/Dockerfile index 8514a510f8a..b73b6397be5 100644 --- a/services/analytics-collector/pod-analytics-collector/Dockerfile +++ b/services/analytics-collector/pod-analytics-collector/Dockerfile @@ -3,6 +3,13 @@ FROM node:20 WORKDIR /usr/src/app RUN npm install --ignore-scripts=false --verbose bufferutil utf-8-validate @mongodb-js/zstd snappy --unsafe-perm +RUN apt-get update +RUN apt-get install libjemalloc2 +RUN apt-get clean + +ENV LD_PRELOAD=libjemalloc.so.2 +ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true + COPY bundle/bundle.js ./ EXPOSE 4007 diff --git a/services/calendar/pod-calendar/Dockerfile b/services/calendar/pod-calendar/Dockerfile index bb64763a26d..ec117e92903 100644 --- a/services/calendar/pod-calendar/Dockerfile +++ b/services/calendar/pod-calendar/Dockerfile @@ -1,8 +1,15 @@ -FROM node:20-alpine +FROM node:20 WORKDIR /usr/src/app +RUN apt-get update +RUN apt-get install libjemalloc2 +RUN apt-get clean + +ENV LD_PRELOAD=libjemalloc.so.2 +ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true + COPY bundle/bundle.js ./ EXPOSE 8095 diff --git a/services/github/pod-github/Dockerfile b/services/github/pod-github/Dockerfile index 1b72ec70dbd..30f1522c4df 100644 --- a/services/github/pod-github/Dockerfile +++ b/services/github/pod-github/Dockerfile @@ -7,6 +7,7 @@ RUN npm install --ignore-scripts=false --verbose bufferutil utf-8-validate @mong RUN apt-get update RUN apt-get install libjemalloc2 +RUN apt-get clean ENV LD_PRELOAD=libjemalloc.so.2 ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true diff --git a/services/gmail/pod-gmail/Dockerfile b/services/gmail/pod-gmail/Dockerfile index edc6643474f..af5b114a12b 100644 --- a/services/gmail/pod-gmail/Dockerfile +++ b/services/gmail/pod-gmail/Dockerfile @@ -1,8 +1,15 @@ -FROM node:20-alpine +FROM node:20 WORKDIR /usr/src/app +RUN apt-get update +RUN apt-get install libjemalloc2 +RUN apt-get clean + +ENV LD_PRELOAD=libjemalloc.so.2 +ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true + COPY bundle/bundle.js ./ EXPOSE 8087 diff --git a/services/love/Dockerfile b/services/love/Dockerfile index 3d6a6bdb8f7..e51e7cdb07a 100644 --- a/services/love/Dockerfile +++ b/services/love/Dockerfile @@ -4,6 +4,13 @@ FROM node:20 WORKDIR /usr/src/app RUN npm install --ignore-scripts=false --verbose bufferutil utf-8-validate @mongodb-js/zstd snappy --unsafe-perm +RUN apt-get update +RUN apt-get install libjemalloc2 +RUN apt-get clean + +ENV LD_PRELOAD=libjemalloc.so.2 +ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true + COPY bundle/bundle.js ./ EXPOSE 8096 diff --git a/services/rekoni/Dockerfile b/services/rekoni/Dockerfile index bc1fe9c95c3..566f2ff9252 100644 --- a/services/rekoni/Dockerfile +++ b/services/rekoni/Dockerfile @@ -1,6 +1,7 @@ -FROM node:20-alpine AS runtime +FROM node:20 AS runtime -RUN apk upgrade --update && apk add \ +RUN apt-get update +RUN apt-get install -y \ coreutils \ antiword \ poppler-utils \ @@ -9,6 +10,14 @@ RUN apk upgrade --update && apk add \ ENV NODE_ENV=production WORKDIR /usr/src/app RUN npm install --ignore-scripts=false --verbose sharp@v0.30.2 pdfjs-dist@v2.12.313 --unsafe-perm + +RUN apt-get update +RUN apt-get install -y libjemalloc2 +RUN apt-get clean + +ENV LD_PRELOAD=libjemalloc.so.2 +ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true + COPY bundle/bundle.js ./ EXPOSE 4004 CMD [ "node", "./bundle.js" ] diff --git a/services/ses/pod-ses/Dockerfile b/services/ses/pod-ses/Dockerfile index f1d88c2c0c2..2eacceee23f 100644 --- a/services/ses/pod-ses/Dockerfile +++ b/services/ses/pod-ses/Dockerfile @@ -1,7 +1,14 @@ -FROM node:20-alpine +FROM node:20 WORKDIR /usr/src/app +RUN apt-get update +RUN apt-get install libjemalloc2 +RUN apt-get clean + +ENV LD_PRELOAD=libjemalloc.so.2 +ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true + COPY bundle/bundle.js ./ EXPOSE 8089 diff --git a/services/sign/pod-sign/Dockerfile b/services/sign/pod-sign/Dockerfile index 12bfc895a94..091f896325f 100644 --- a/services/sign/pod-sign/Dockerfile +++ b/services/sign/pod-sign/Dockerfile @@ -6,6 +6,13 @@ WORKDIR /usr/src/app RUN npm install --ignore-scripts=false --verbose bufferutil utf-8-validate @mongodb-js/zstd snappy --unsafe-perm +RUN apt-get update +RUN apt-get install libjemalloc2 +RUN apt-get clean + +ENV LD_PRELOAD=libjemalloc.so.2 +ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true + COPY bundle/bundle.js ./ CMD [ "dumb-init", "node", "bundle.js" ] diff --git a/services/telegram-bot/pod-telegram-bot/Dockerfile b/services/telegram-bot/pod-telegram-bot/Dockerfile index cc072707042..b2f46d3ead1 100644 --- a/services/telegram-bot/pod-telegram-bot/Dockerfile +++ b/services/telegram-bot/pod-telegram-bot/Dockerfile @@ -1,7 +1,14 @@ -FROM node:20-alpine +FROM node:20 WORKDIR /usr/src/app +RUN apt-get update +RUN apt-get install libjemalloc2 +RUN apt-get clean + +ENV LD_PRELOAD=libjemalloc.so.2 +ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true + COPY bundle/bundle.js ./ EXPOSE 4020 diff --git a/services/telegram/pod-telegram/Dockerfile b/services/telegram/pod-telegram/Dockerfile index 6134ee0ea67..644892d1206 100644 --- a/services/telegram/pod-telegram/Dockerfile +++ b/services/telegram/pod-telegram/Dockerfile @@ -1,8 +1,15 @@ -FROM node:20-alpine +FROM node:20 WORKDIR /usr/src/app +RUN apt-get update +RUN apt-get install libjemalloc2 +RUN apt-get clean + +ENV LD_PRELOAD=libjemalloc.so.2 +ENV MALLOC_CONF=dirty_decay_ms:1000,narenas:2,background_thread:true + COPY bundle/bundle.js ./ EXPOSE 8086