fix: more docker issues
This commit is contained in:
+7
-3
@@ -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"]
|
||||
Reference in New Issue
Block a user