diff --git a/pods/account/Dockerfile b/pods/account/Dockerfile index 0879745fff..270607dfb8 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 690eec7953..aab274c786 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 101ba42731..2f2ec25053 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 acdf2ad0a7..d1dfeb5e71 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 938ff0edc2..20a45aca0c 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 2e92c9497d..1086d64b38 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 20807f1330..ce84366d90 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 aba9997f63..940ae9d120 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 8514a510f8..b73b6397be 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 bb64763a26..ec117e9290 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 1b72ec70db..30f1522c4d 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 edc6643474..af5b114a12 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 3d6a6bdb8f..e51e7cdb07 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 bc1fe9c95c..566f2ff925 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 f1d88c2c0c..2eacceee23 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 12bfc895a9..091f896325 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 cc07270704..b2f46d3ead 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 6134ee0ea6..644892d120 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