fix: more docker issues

This commit is contained in:
2026-09-19 22:43:34 +02:00
parent b7d6ea90c4
commit a282fcc0d2
+7 -3
View File
@@ -37,13 +37,17 @@ 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 (includes all deps — fine for production)
# Copy installed node_modules
COPY --from=builder /app/node_modules ./node_modules
# Resolve workspace symlinks — copy built shared package over the symlink
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
EXPOSE 3001
# Run migrations on startup, then start server
CMD ["sh", "-c", "npx prisma migrate deploy && node dist/main"]
CMD ["sh", "-c", "npx prisma migrate deploy && node dist/main.js"]
# ---- Production Dashboard image ----
FROM node:20-alpine AS dashboard
@@ -59,4 +63,4 @@ COPY --from=builder /app/node_modules ./node_modules
EXPOSE 3000
CMD ["node_modules/.bin/next", "start"]
CMD ["npx", "next", "start"]