fix: fuck docker lowk
This commit is contained in:
+4
-10
@@ -31,19 +31,14 @@ RUN pnpm --filter @kooltab/dashboard run build
|
|||||||
# ---- Production API image ----
|
# ---- Production API image ----
|
||||||
FROM node:20-alpine AS api
|
FROM node:20-alpine AS api
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
RUN npm install -g pnpm
|
|
||||||
|
|
||||||
# Copy built API output
|
# Copy built API output
|
||||||
COPY --from=builder /app/apps/api/dist ./dist
|
COPY --from=builder /app/apps/api/dist ./dist
|
||||||
COPY --from=builder /app/apps/api/prisma ./prisma
|
COPY --from=builder /app/apps/api/prisma ./prisma
|
||||||
COPY --from=builder /app/apps/api/package.json ./
|
COPY --from=builder /app/apps/api/package.json ./
|
||||||
|
|
||||||
# Install only production dependencies
|
# Copy installed node_modules (includes all deps — fine for production)
|
||||||
RUN pnpm install --frozen-lockfile --prod
|
COPY --from=builder /app/node_modules ./node_modules
|
||||||
|
|
||||||
# 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/
|
|
||||||
|
|
||||||
EXPOSE 3001
|
EXPOSE 3001
|
||||||
|
|
||||||
@@ -53,15 +48,14 @@ CMD ["sh", "-c", "npx prisma migrate deploy && node dist/main"]
|
|||||||
# ---- Production Dashboard image ----
|
# ---- Production Dashboard image ----
|
||||||
FROM node:20-alpine AS dashboard
|
FROM node:20-alpine AS dashboard
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
RUN npm install -g pnpm
|
|
||||||
|
|
||||||
COPY --from=builder /app/apps/dashboard/.next ./.next
|
COPY --from=builder /app/apps/dashboard/.next ./.next
|
||||||
COPY --from=builder /app/apps/dashboard/public ./public
|
COPY --from=builder /app/apps/dashboard/public ./public
|
||||||
COPY --from=builder /app/apps/dashboard/package.json ./
|
COPY --from=builder /app/apps/dashboard/package.json ./
|
||||||
COPY --from=builder /app/apps/dashboard/next.config.js ./
|
COPY --from=builder /app/apps/dashboard/next.config.js ./
|
||||||
|
|
||||||
# Install only production dependencies
|
# Copy installed node_modules
|
||||||
RUN pnpm install --frozen-lockfile --prod
|
COPY --from=builder /app/node_modules ./node_modules
|
||||||
|
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user