feat(build): image builds auto-install latest @otm/account-panel

Packument ADD cache-busts only on a publish; pin stays as the dev floor.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WqSCBQyyBbgWRXMR5qo3ZK
This commit is contained in:
2026-07-10 23:05:37 -05:00
parent f351ed3846
commit 2ad9ac53f8

View File

@@ -10,6 +10,17 @@ COPY package.json package-lock.json* ./
COPY prisma ./prisma COPY prisma ./prisma
RUN npm ci RUN npm ci
# Workspace-style freshness for the shared OTM UI package: every image build
# installs the latest published @otm/account-panel on top of the lockfile, so
# rebuilds pick up package releases without needing a pin-bump commit (the
# package.json pin is the dev-time floor). The ADD pulls the registry
# packument, which only changes on a publish — so this layer stays cached
# between publishes and busts exactly when a new version exists. Moonbase
# builds on the NAS itself, so the LAN host is always reachable.
COPY .npmrc ./
ADD http://192.168.0.5:3022/api/packages/tonym/npm/@otm/account-panel /tmp/otm-account-panel.packument.json
RUN npm install --no-save --no-audit --no-fund @otm/account-panel@latest
# ---- build ---- # ---- build ----
FROM node:20-bookworm-slim AS build FROM node:20-bookworm-slim AS build
WORKDIR /app WORKDIR /app