fix: prevent Chromium zombie leak in htmlToPdf
- Wrap browser lifecycle in try/finally so browser.close() always runs - Fall back to SIGKILL of browser.process() if close() fails - Add --disable-dev-shm-usage to launch args (container stability) - Add tini as ENTRYPOINT in Dockerfile for defense in depth - Bump version to 1.0.2
This commit is contained in:
@@ -4,6 +4,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
chromium \
|
||||
fonts-freefont-ttf \
|
||||
fonts-noto-cjk \
|
||||
tini \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
@@ -21,4 +22,5 @@ EXPOSE 3000
|
||||
HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
|
||||
CMD node -e "require('http').get('http://localhost:3000/health', r => process.exit(r.statusCode === 200 ? 0 : 1))"
|
||||
|
||||
ENTRYPOINT ["/usr/bin/tini", "--"]
|
||||
CMD ["node", "server.js"]
|
||||
|
||||
Reference in New Issue
Block a user