-
Notifications
You must be signed in to change notification settings - Fork 427
Expand file tree
/
Copy pathDockerfile.dev
More file actions
26 lines (22 loc) · 867 Bytes
/
Copy pathDockerfile.dev
File metadata and controls
26 lines (22 loc) · 867 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Stage 1: Extract only package.json files for install resolution
FROM alpine AS extractor
WORKDIR /app
COPY . .
RUN find . -type f \! -name 'package.json' \! -name 'pnpm-workspace.yaml' \! -name 'pnpm-lock.yaml' -delete && \
find . -type d -empty -delete
# Stage 2: Install dependencies (cached layer)
FROM node:26-alpine AS deps
RUN npm install -g corepack && corepack enable && corepack prepare pnpm@9.15.4 --activate
WORKDIR /app
COPY --from=extractor /app ./
RUN --mount=type=cache,id=pnpm,target=/root/.local/share/pnpm/store pnpm install --frozen-lockfile
# Stage 3: Generate Prisma client
FROM deps
COPY prisma/ ./prisma/
COPY prisma.config.ts ./
RUN npx prisma generate
# Copy prebuild scripts for runtime use
COPY scripts/copy-cesium.mjs scripts/sync-local-plugins.mjs ./scripts/
ENV WATCHPACK_POLLING=true
ENV NEXT_TELEMETRY_DISABLED=1
EXPOSE 3000