npm store as build cache

This commit is contained in:
Elio Bischof
2025-07-24 16:13:13 +02:00
parent 33d3dac6e5
commit b6346446ff
6 changed files with 19 additions and 15 deletions

View File

@@ -8,9 +8,11 @@ ENV SHELL=/bin/bash \
PNPM_HOME=/home/node/.local/share/pnpm \
PATH=/home/node/.local/share/pnpm:$PATH
RUN apt-get update && \
apt-get --no-install-recommends install -y \
libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libnss3 libxss1 libasound2 libxtst6 xauth xvfb && \
apt-get clean && \
corepack enable && COREPACK_ENABLE_DOWNLOAD_PROMPT=0 corepack prepare pnpm@9.1.2 --activate
RUN --mount=type=cache,id=pnpm,target=/home/node/.local/share/pnpm/store \
pnpm install --frozen-lockfile --recursive

View File

@@ -6,14 +6,11 @@ services:
context: .
volumes:
- ../../:/workspaces:cached
- /tmp/.X11-unix:/tmp/.X11-unix:cached
- home-dir:/home/node:delegated
command: sleep infinity
working_dir: /workspaces
environment:
ZITADEL_DATABASE_POSTGRES_HOST: db
ZITADEL_EXTERNALSECURE: false
PNPM_HOME: $PNPM_HOME
db:
container_name: db