fix: fuck docker man
This commit is contained in:
+9
-6
@@ -28,6 +28,9 @@ RUN cd apps/api && npx prisma generate
|
||||
RUN pnpm --filter @kooltab/api run build
|
||||
RUN pnpm --filter @kooltab/dashboard run build
|
||||
|
||||
# Flatten symlinks in node_modules so Docker COPY works reliably
|
||||
RUN cp -rL node_modules /app/node_modules_flat
|
||||
|
||||
# ---- Production API image ----
|
||||
FROM node:20-alpine AS api
|
||||
WORKDIR /app
|
||||
@@ -37,10 +40,10 @@ COPY --from=builder /app/apps/api/dist ./dist
|
||||
COPY --from=builder /app/apps/api/prisma ./prisma
|
||||
COPY --from=builder /app/apps/api/package.json ./
|
||||
|
||||
# Copy installed node_modules
|
||||
COPY --from=builder /app/node_modules ./node_modules
|
||||
# Copy flat node_modules (no pnpm symlinks)
|
||||
COPY --from=builder /app/node_modules_flat ./node_modules
|
||||
|
||||
# Resolve workspace symlinks — copy built shared package over the symlink
|
||||
# Copy built shared package (replaces workspace symlink with real files)
|
||||
COPY --from=builder /app/packages/shared/dist ./node_modules/@kooltab/shared/dist
|
||||
COPY --from=builder /app/packages/shared/package.json ./node_modules/@kooltab/shared/package.json
|
||||
|
||||
@@ -58,10 +61,10 @@ COPY --from=builder /app/apps/dashboard/package.json ./
|
||||
COPY --from=builder /app/apps/dashboard/next.config.js ./
|
||||
RUN mkdir -p public
|
||||
|
||||
# Copy installed node_modules
|
||||
COPY --from=builder /app/node_modules ./node_modules
|
||||
# Copy flat node_modules (no pnpm symlinks)
|
||||
COPY --from=builder /app/node_modules_flat ./node_modules
|
||||
|
||||
# Resolve workspace symlinks for shared package
|
||||
# Copy built shared package
|
||||
COPY --from=builder /app/packages/shared/dist ./node_modules/@kooltab/shared/dist
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
Reference in New Issue
Block a user