Skip to content

Commit

Permalink
fix?: use tini to reap chrome subprocesses
Browse files Browse the repository at this point in the history
Also calls node directly as the entrypoint command, and avoids the use
of npm as a runtime dependency
  • Loading branch information
trev-dev committed Jul 24, 2024
1 parent 4813744 commit e8ef87d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ RUN npm ci
COPY . /opt/app-root/src

RUN apk upgrade --no-cache --available \
&& apk add --no-cache chromium-swiftshader nss freetype harfbuzz ca-certificates ttf-freefont ghostscript
&& apk add --no-cache chromium-swiftshader nss freetype \
harfbuzz ca-certificates ttf-freefont tini ghostscript

ENV CHROME_BIN=/usr/bin/chromium-browser \
CHROME_PATH=/usr/lib/chromium/ \
Expand All @@ -25,4 +26,5 @@ RUN mkdir -p /tmp/npm \
&& chmod -R 777 /tmp/npm

EXPOSE 443 8080
CMD ["npm", "start"]
ENTRYPOINT ["/sbin/tini", "--"]
CMD ["node" "--max-old-space-size=450" "./src/server.js"]

0 comments on commit e8ef87d

Please sign in to comment.