1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-08-09 15:35:29 +02:00

node:lts is head to node:20

This commit is contained in:
NavyStack 2023-12-18 18:14:14 +09:00
parent 86edf2f180
commit c7664dbf7a
2 changed files with 60 additions and 1 deletions

View file

@ -13,7 +13,7 @@ RUN npm install npm@latest --global \
&& pnpm import \
&& pnpm install --prod
FROM node:lts AS client
FROM node:18-bookworm AS client
WORKDIR /app

59
debian.Dockerfile Normal file
View file

@ -0,0 +1,59 @@
FROM node:18-bookworm as server-dependencies
RUN apt-get update \
&& apt-get install -y \
tini
WORKDIR /app
COPY server/package.json server/package-lock.json ./
RUN npm install npm@latest --global \
&& npm install pnpm --global \
&& pnpm import \
&& pnpm install --prod
FROM node:18-bookworm AS client
WORKDIR /app
COPY client/package.json client/package-lock.json ./
RUN npm install npm@latest --global \
&& npm install pnpm --global \
&& pnpm import \
&& pnpm install --prod
COPY client .
RUN DISABLE_ESLINT_PLUGIN=true npm run build
FROM node:18-bookworm-slim AS final
ARG USER=planka
RUN useradd --no-create-home --shell /bin/bash $USER
USER $USER
WORKDIR /app
COPY --chown=$USER:$USER start.sh .
COPY --chown=$USER:$USER server .
RUN mv .env.sample .env
COPY --from=server-dependencies --chown=$USER:$USER /app/node_modules node_modules
COPY --from=server-dependencies --chown=$USER:$USER /usr/bin/tini /usr/local/bin/tini
COPY --from=client --chown=$USER:$USER /app/build public
COPY --from=client --chown=$USER:$USER /app/build/index.html views/index.ejs
VOLUME /app/public/user-avatars
VOLUME /app/public/project-background-images
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 ["tini", "--"]
CMD ["./start.sh"]