mirror of
https://github.com/plankanban/planka.git
synced 2025-08-09 15:35:29 +02:00
.
This commit is contained in:
parent
c7664dbf7a
commit
55c618af06
6 changed files with 19352 additions and 21 deletions
|
@ -21,9 +21,11 @@ jobs:
|
|||
|
||||
- name: Client install dependencies
|
||||
run: pnpm install
|
||||
working-directory: ./client
|
||||
|
||||
- name: Server install dependencies
|
||||
run: pnpm install
|
||||
working-directory: ./server
|
||||
|
||||
- name: Server include into dist
|
||||
run: mv server/ dist/
|
||||
|
|
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -8,7 +8,7 @@ docker-compose.override.yml
|
|||
# If some case you are using pnpm or yarn, don't forget to generate npm lockfile
|
||||
# before commiting your code by running:
|
||||
# `npm i --package-lock-only`
|
||||
pnpm-lock.yaml
|
||||
|
||||
yarn.lock
|
||||
|
||||
# Chart dependencies
|
||||
|
|
12624
client/pnpm-lock.yaml
generated
Normal file
12624
client/pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load diff
|
@ -1,3 +1,4 @@
|
|||
# Step 1: server-dependencies
|
||||
FROM node:18-bookworm as server-dependencies
|
||||
|
||||
RUN apt-get update \
|
||||
|
@ -7,50 +8,59 @@ RUN apt-get update \
|
|||
WORKDIR /app
|
||||
|
||||
COPY server/package.json server/package-lock.json ./
|
||||
COPY server/pnpm-lock.yaml .
|
||||
|
||||
RUN npm install npm@latest --global \
|
||||
&& npm install pnpm --global \
|
||||
&& pnpm import \
|
||||
&& pnpm install --prod
|
||||
RUN npm install pnpm --global && \
|
||||
pnpm install --prod
|
||||
|
||||
# Step 2: client
|
||||
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 npm install pnpm --global && \
|
||||
pnpm install --prod
|
||||
|
||||
RUN DISABLE_ESLINT_PLUGIN=true npm run build
|
||||
|
||||
# Step 3: intermediate
|
||||
FROM node:18-bookworm-slim AS intermediate
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=server-dependencies /app/node_modules node_modules
|
||||
COPY --from=server-dependencies /usr/bin/tini /usr/local/bin/tini
|
||||
|
||||
COPY --from=client /app/build public
|
||||
COPY --from=client /app/build/index.html views/index.ejs
|
||||
|
||||
COPY start.sh .
|
||||
COPY server .
|
||||
|
||||
RUN mv .env.sample .env
|
||||
|
||||
# Step 4: final
|
||||
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
|
||||
COPY --from=intermediate --chown=$USER:$USER /app .
|
||||
|
||||
VOLUME /app/public/user-avatars
|
||||
VOLUME /app/public/project-background-images
|
||||
VOLUME /app/private/attachments
|
||||
|
||||
EXPOSE 1337
|
||||
EXPOSE 1337/tcp
|
||||
|
||||
# Use Tini to start Planka and shutdown gracefully:
|
||||
# https://github.com/nodejs/docker-node/blob/main/docs/BestPractices.md#handling-kernel-signals
|
||||
|
|
1362
pnpm-lock.yaml
generated
Normal file
1362
pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load diff
5333
server/pnpm-lock.yaml
generated
Normal file
5333
server/pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue