From 60e10af4aaaa13a47c0ae169e2e41b270c352a73 Mon Sep 17 00:00:00 2001 From: Bas van den Wollenberg Date: Wed, 13 May 2026 17:07:29 +0200 Subject: [PATCH] fix(Dockerfile): pnpm v11 build errors - pnpm doesn't implicitly ignore post-install scripts anymore which means trying to build the docker image now fails. i've explicitly allowed them but idk could also ignore them maybe not sure what they actually do lol - added `confirmModulesPurge: false` but not sure what it actually does as it's not documented? but either way it's also required for the `pnpm build` step to succeed non-interactively it seems idk weird stuff - removed msmtp/sendmail while i was at it just like https://tangled.org/tranquil.farm/tranquil-pds/commit/f176f55862bc4c41472f8697cc2ca069c24d5e37 --- Dockerfile | 5 ++--- frontend/Dockerfile | 2 +- frontend/pnpm-lock.yaml | 1 - frontend/pnpm-workspace.yaml | 4 ++++ 4 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 frontend/pnpm-workspace.yaml diff --git a/Dockerfile b/Dockerfile index d62128c..b2f4c25 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM node:24-alpine AS frontend RUN corepack enable && corepack prepare pnpm@latest --activate WORKDIR /app -COPY frontend/package.json frontend/pnpm-lock.yaml ./ +COPY frontend/package.json frontend/pnpm-lock.yaml frontend/pnpm-workspace.yaml ./ RUN pnpm install --frozen-lockfile COPY frontend/ ./ RUN pnpm build @@ -46,8 +46,7 @@ RUN --mount=type=cache,target=/usr/local/cargo/registry \ cp target/release/tranquil-server /tmp/tranquil-pds FROM alpine:3.23 -RUN apk add --no-cache msmtp ca-certificates \ - && ln -sf /usr/bin/msmtp /usr/sbin/sendmail +RUN apk add --no-cache ca-certificates COPY --from=builder /tmp/tranquil-pds /usr/local/bin/tranquil-pds COPY --from=frontend /app/dist /var/lib/tranquil-pds/frontend WORKDIR /app diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 6cb3f75..716d640 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -1,7 +1,7 @@ FROM node:24-alpine AS builder RUN corepack enable && corepack prepare pnpm@latest --activate WORKDIR /app -COPY package.json pnpm-lock.yaml ./ +COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./ RUN pnpm install --frozen-lockfile COPY . ./ RUN pnpm build diff --git a/frontend/pnpm-lock.yaml b/frontend/pnpm-lock.yaml index d17267b..40cc12e 100644 --- a/frontend/pnpm-lock.yaml +++ b/frontend/pnpm-lock.yaml @@ -1311,7 +1311,6 @@ packages: whatwg-encoding@3.1.1: resolution: {integrity: sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==} engines: {node: '>=18'} - deprecated: Use @exodus/bytes instead for a more spec-conformant and faster implementation whatwg-mimetype@4.0.0: resolution: {integrity: sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==} diff --git a/frontend/pnpm-workspace.yaml b/frontend/pnpm-workspace.yaml new file mode 100644 index 0000000..7cad68f --- /dev/null +++ b/frontend/pnpm-workspace.yaml @@ -0,0 +1,4 @@ +confirmModulesPurge: false +allowBuilds: + es5-ext: true + esbuild: true