fix: fuck docker lowk

This commit is contained in:
2026-09-19 22:37:03 +02:00
parent 2e56418a17
commit 0b5773d709
+4 -10
View File
@@ -31,19 +31,14 @@ RUN pnpm --filter @kooltab/dashboard run build
# ---- Production API image ----
FROM node:20-alpine AS api
WORKDIR /app
RUN npm install -g pnpm
# Copy built API output
COPY --from=builder /app/apps/api/dist ./dist
COPY --from=builder /app/apps/api/prisma ./prisma
COPY --from=builder /app/apps/api/package.json ./
# Install only production dependencies
RUN pnpm install --frozen-lockfile --prod
# Copy shared package (needed at runtime)
COPY --from=builder /app/packages/shared/dist ./node_modules/@kooltab/shared/dist
COPY --from=builder /app/packages/shared/package.json ./node_modules/@kooltab/shared/
# Copy installed node_modules (includes all deps — fine for production)
COPY --from=builder /app/node_modules ./node_modules
EXPOSE 3001
@@ -53,15 +48,14 @@ CMD ["sh", "-c", "npx prisma migrate deploy && node dist/main"]
# ---- Production Dashboard image ----
FROM node:20-alpine AS dashboard
WORKDIR /app
RUN npm install -g pnpm
COPY --from=builder /app/apps/dashboard/.next ./.next
COPY --from=builder /app/apps/dashboard/public ./public
COPY --from=builder /app/apps/dashboard/package.json ./
COPY --from=builder /app/apps/dashboard/next.config.js ./
# Install only production dependencies
RUN pnpm install --frozen-lockfile --prod
# Copy installed node_modules
COPY --from=builder /app/node_modules ./node_modules
EXPOSE 3000