added dumb-init for better signal handling

This commit is contained in:
Aaro Koivukangas
2024-03-10 17:20:21 +02:00
parent 33f868cdda
commit 498ed385e3
+4
View File
@@ -3,6 +3,8 @@ FROM node as builder
# Create app directory
WORKDIR /usr/src/app
RUN apt update -y && apt upgrade -y && apt install -y dumb-init
# Install app dependencies
COPY package.json yarn.lock ./
@@ -26,6 +28,8 @@ COPY package.json yarn.lock ./
RUN yarn install --production --frozen-lockfile
COPY --from=builder /usr/src/app/dist ./dist
COPY --from=builder /usr/bin/dumb-init /usr/bin/dumb-init
EXPOSE 8080
ENTRYPOINT [ "dumb-init", "--" ]
CMD [ "node", "dist/index.js" ]