mirror of
https://github.com/plankanban/planka.git
synced 2025-07-18 20:59:44 +02:00
pnpm + uv for faster build
This commit is contained in:
parent
f7a9ea9c03
commit
a5b3b4ad5b
1 changed files with 10 additions and 9 deletions
19
Dockerfile
19
Dockerfile
|
@ -7,8 +7,8 @@ WORKDIR /app
|
||||||
|
|
||||||
COPY server/package.json server/package-lock.json server/requirements.txt ./
|
COPY server/package.json server/package-lock.json server/requirements.txt ./
|
||||||
|
|
||||||
RUN npm install npm --global \
|
RUN npm install -g pnpm@latest-10 \
|
||||||
&& npm install --omit=dev
|
&& pnpm install -P
|
||||||
|
|
||||||
FROM node:lts AS client
|
FROM node:lts AS client
|
||||||
|
|
||||||
|
@ -16,26 +16,27 @@ WORKDIR /app
|
||||||
|
|
||||||
COPY client .
|
COPY client .
|
||||||
|
|
||||||
RUN npm install npm --global \
|
RUN npm install -g pnpm@latest-10 \
|
||||||
&& npm install --omit=dev
|
&& pnpm install -P
|
||||||
|
|
||||||
RUN DISABLE_ESLINT_PLUGIN=true npm run build
|
RUN DISABLE_ESLINT_PLUGIN=true pnpm run build
|
||||||
|
|
||||||
FROM node:18-alpine
|
FROM node:18-alpine
|
||||||
|
|
||||||
RUN apk -U upgrade \
|
RUN apk -U upgrade \
|
||||||
&& apk add bash python3 --no-cache \
|
&& apk add bash python3 --no-cache \
|
||||||
&& npm install npm --global
|
&& npm install -g pnpm@latest-10
|
||||||
|
|
||||||
USER node
|
USER node
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY --chown=node:node server .
|
COPY --chown=node:node server .
|
||||||
|
|
||||||
RUN python3 -m venv .venv \
|
RUN wget -qO- https://astral.sh/uv/install.sh | sh \
|
||||||
&& .venv/bin/pip3 install -r requirements.txt --no-cache-dir \
|
&& /home/node/.local/bin/uv venv \
|
||||||
|
&& /home/node/.local/bin/uv pip install -r requirements.txt --no-cache-dir \
|
||||||
&& mv .env.sample .env \
|
&& mv .env.sample .env \
|
||||||
&& npm config set update-notifier false
|
&& pnpm config set update-notifier false
|
||||||
|
|
||||||
COPY --from=server-dependencies --chown=node:node /app/node_modules node_modules
|
COPY --from=server-dependencies --chown=node:node /app/node_modules node_modules
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue