mirror of
https://github.com/plankanban/planka.git
synced 2025-08-09 15:35:29 +02:00
Improve signal handlers
This commit is contained in:
parent
8c340160c1
commit
30341f0494
1 changed files with 9 additions and 4 deletions
13
Dockerfile
13
Dockerfile
|
@ -1,12 +1,12 @@
|
|||
FROM node:18-alpine as server-dependencies
|
||||
|
||||
RUN apk -U upgrade \
|
||||
&& apk add build-base python3 \
|
||||
&& apk add build-base python3 tini \
|
||||
--no-cache
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY server/package.json server/package-lock.json .
|
||||
COPY server/package.json server/package-lock.json ./
|
||||
|
||||
RUN npm install npm@latest --global \
|
||||
&& npm install pnpm --global \
|
||||
|
@ -17,7 +17,7 @@ FROM node:lts AS client
|
|||
|
||||
WORKDIR /app
|
||||
|
||||
COPY client/package.json client/package-lock.json .
|
||||
COPY client/package.json client/package-lock.json ./
|
||||
|
||||
RUN npm install npm@latest --global \
|
||||
&& npm install pnpm --global \
|
||||
|
@ -27,7 +27,7 @@ RUN npm install npm@latest --global \
|
|||
COPY client .
|
||||
RUN DISABLE_ESLINT_PLUGIN=true npm run build
|
||||
|
||||
FROM node:18-alpine
|
||||
FROM node:18-alpine AS final
|
||||
|
||||
RUN apk -U upgrade \
|
||||
&& apk add bash \
|
||||
|
@ -42,6 +42,7 @@ COPY --chown=node:node server .
|
|||
RUN mv .env.sample .env
|
||||
|
||||
COPY --from=server-dependencies --chown=node:node /app/node_modules node_modules
|
||||
COPY --from=server-dependencies --chown=node:node /sbin/tini /sbin/tini
|
||||
|
||||
COPY --from=client --chown=node:node /app/build public
|
||||
COPY --from=client --chown=node:node /app/build/index.html views/index.ejs
|
||||
|
@ -52,4 +53,8 @@ VOLUME /app/private/attachments
|
|||
|
||||
EXPOSE 1337
|
||||
|
||||
# Use Tini to start Planka and Shutdown gracefully:
|
||||
# https://github.com/nodejs/docker-node/blob/main/docs/BestPractices.md#handling-kernel-signals
|
||||
ENTRYPOINT ["/sbin/tini", "--"]
|
||||
|
||||
CMD ["./start.sh"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue