Build the plugin-sdk package in the api image (#71)
Some checks failed
CD / Build and push images (push) Successful in 3m19s
CI / Lint, typecheck, test (push) Successful in 3m22s
CI / Auth e2e pack (push) Successful in 4m3s
CI / Import/export fidelity gate (push) Successful in 54s
CI / Build container images (push) Has been skipped
CD / Deploy to Test (push) Successful in 9s
CD / Smoke tests against Test (push) Failing after 3m40s
CD / Promote to Int (push) Has been skipped

The api now depends on @dorfteich/plugin-sdk, so the api Dockerfile must
copy and build it alongside shared — the CD "Build and push images" (and
CI "Build container images") step failed without it. Also pre-create
/data/plugins so the plugins named volume is writable by the non-root user,
mirroring /data/uploads.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EwZ4jR4KFAPvpjWevfUGX1
This commit is contained in:
Claude Opus 4.8 2026-07-10 16:59:29 +02:00
parent 621aa47244
commit d7aa1fb6da

View File

@ -6,10 +6,12 @@ WORKDIR /repo
RUN npm install -g pnpm@11
COPY pnpm-workspace.yaml pnpm-lock.yaml package.json tsconfig.base.json ./
COPY packages/shared ./packages/shared
COPY packages/plugin-sdk ./packages/plugin-sdk
COPY apps/api ./apps/api
COPY deploy/fonts ./deploy/fonts
RUN pnpm install --frozen-lockfile --filter @dorfteich/api... \
&& pnpm --filter @dorfteich/shared build \
&& pnpm --filter @dorfteich/plugin-sdk build \
&& pnpm --filter @dorfteich/api build \
# Bake the self-hosted font catalog in so the PDF exporter can inline a
# pond's fonts as base64 (ADR 0016). Same download as the web image; fails
@ -28,10 +30,11 @@ WORKDIR /app
COPY --from=build --chown=node:node /out /app
# Generate the Prisma client for this image's platform.
RUN node node_modules/prisma/build/index.js generate
# A fresh named volume mounted at /data/uploads is created root-owned;
# pre-creating it here (Docker copies an image directory's ownership into
# a new volume on first mount) lets the non-root `node` user write to it.
RUN mkdir -p /data/uploads && chown -R node:node /data/uploads
# A fresh named volume mounted at /data/uploads or /data/plugins is created
# root-owned; pre-creating them here (Docker copies an image directory's
# ownership into a new volume on first mount) lets the non-root `node` user
# write to them.
RUN mkdir -p /data/uploads /data/plugins && chown -R node:node /data/uploads /data/plugins
USER node
EXPOSE 3000
HEALTHCHECK --interval=30s --timeout=3s --retries=3 \