docker: ensure prod stage installs deps and uses builder server-dist; keep client dist from context

This commit is contained in:
2025-10-06 18:02:13 +02:00
parent 05b54f41fe
commit 6f395f2d7b

View File

@@ -43,9 +43,8 @@ COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
RUN pnpm install --frozen-lockfile --prod --ignore-scripts=false --enable-pre-post-scripts \ RUN pnpm install --frozen-lockfile --prod --ignore-scripts=false --enable-pre-post-scripts \
&& pnpm rebuild bcrypt --build-from-source || true && pnpm rebuild bcrypt --build-from-source || true
# Copy prebuilt application artifacts from repository (no TS build in image) # Copy client build from context and server build from builder
COPY dist ./dist COPY dist ./dist
# Use freshly built server from builder stage
COPY --from=builder /app/server-dist ./server-dist COPY --from=builder /app/server-dist ./server-dist
COPY public ./public COPY public ./public