Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ RUN echo "$GIT_COMMIT" > dist/version.txt

FROM node:20-alpine

# tini as PID 1: forwards SIGTERM to node so stops behave exactly as they did
# under npm (immediate exit), without npm's 5-line error block on every stop.
# Bare node as PID 1 would IGNORE SIGTERM (no handler + PID-1 semantics) and
# get SIGKILLed after the grace period instead.
RUN apk add --no-cache tini

USER node
WORKDIR /home/node

Expand All @@ -45,4 +51,6 @@ COPY --from=builder /home/node/assets ./assets

EXPOSE 3000

CMD ["npm", "run", "start:prod"]
ENTRYPOINT ["/sbin/tini", "--"]
# Mirrors package.json start:prod — keep the two in sync.
CMD ["node", "--max-old-space-size=6144", "dist/src/main"]