fix(admin): use npm workspace in Docker

Align admin production and development images with the repository's committed npm workspace and lockfile. This ensures shared and Expo-linked dependencies are installed before the admin build runs.
This commit is contained in:
jjbrunton committed 2026-08-27 21:49:42 +01:00
1 parent 6df9442cd0
commit 7545289dd3
2 files changed
+8 -34

No files matched your search

+4 -11
View File
@@ -2,19 +2,12 @@ FROM node:20-bookworm-slim AS builder
WORKDIR /app
# Enable pnpm via corepack (allow non-matching packageManager)
ENV COREPACK_ENABLE_STRICT=0
ENV PNPM_CONFIG_LINK_WORKSPACE_PACKAGES=true
RUN corepack enable && corepack prepare pnpm@9.15.0 --activate
# Copy everything first (workspaces need full structure)
# Copy the npm workspace and install from its committed lockfile.
COPY . .
# Install all dependencies
RUN pnpm install --no-frozen-lockfile
RUN npm ci
# Build shared package first
RUN pnpm exec turbo run build --filter=@sauci/shared
RUN npm run build -w @sauci/shared
# Build admin app with env vars
ARG VITE_SUPABASE_URL
@@ -41,7 +34,7 @@ ENV VITE_COUNCIL_ENABLED=$VITE_COUNCIL_ENABLED
ENV VITE_COUNCIL_GENERATOR_MODEL=$VITE_COUNCIL_GENERATOR_MODEL
ENV VITE_COUNCIL_REVIEWER_MODEL=$VITE_COUNCIL_REVIEWER_MODEL
RUN pnpm exec turbo run build --filter=@sauci/admin
RUN npm run build -w @sauci/admin
FROM nginx:alpine
COPY --from=builder /app/apps/admin/dist /usr/share/nginx/html