mirror of
https://github.com/jjbrunton/Sauci.git
synced 2026-10-31 18:19:43 +00:00
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:
1 parent
6df9442cd0
commit
7545289dd3
2 files changed
+8
-34
No files matched your search
@@ -2,34 +2,15 @@ FROM node:20-bookworm-slim
|
||||
|
||||
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 root package files and workspace configs
|
||||
COPY package*.json ./
|
||||
COPY pnpm-workspace.yaml ./
|
||||
COPY turbo.json ./
|
||||
|
||||
# Copy all workspace package.json files
|
||||
COPY apps/admin/package.json ./apps/admin/
|
||||
COPY apps/mobile/package.json ./apps/mobile/
|
||||
COPY apps/supabase/package.json ./apps/supabase/
|
||||
COPY apps/web/package.json ./apps/web/
|
||||
COPY packages/shared/package.json ./packages/shared/
|
||||
|
||||
# Install all dependencies at root level (workspaces)
|
||||
RUN pnpm install --no-frozen-lockfile
|
||||
|
||||
# Copy all source code
|
||||
# Install the complete npm workspace from its committed lockfile.
|
||||
COPY . .
|
||||
RUN npm ci
|
||||
|
||||
# Build shared package
|
||||
RUN pnpm exec turbo run build --filter=@sauci/shared
|
||||
RUN npm run build -w @sauci/shared
|
||||
|
||||
WORKDIR /app/apps/admin
|
||||
|
||||
EXPOSE 3001
|
||||
|
||||
CMD ["pnpm", "run", "dev"]
|
||||
CMD ["npm", "run", "dev"]
|
||||
Reference in new issue
Block a user