Files
johndoe6345789 9df6e1c64f fix: upgrade all Dockerfiles to node:24-alpine, fix portal build errors
- Update all 12 Dockerfiles from node:18/20/22 to node:24-alpine
- Fix caproverforge portal: remove event handlers from Server Component
- Fix repoforge/caproverforge portals: ensure public/ dir exists in builder
- Fix packagerepo Dockerfile: node:18 → node:24 (Next.js 16 requires >=20)
- Fix DBAL frontend port conflict: 3009 → 3015 (3009 in use by external container)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 21:43:28 +00:00

38 lines
1.1 KiB
Docker

# Multi-stage build (standalone - no monorepo deps)
# Context: monorepo root (..)
FROM node:24-alpine AS deps
WORKDIR /app
COPY frontends/exploded-diagrams/package.json ./frontends/exploded-diagrams/
RUN cd frontends/exploded-diagrams && for i in 1 2 3 4 5; do \
npm install && break \
|| (echo "npm install failed (attempt $i/5), retrying in $((i*10))s..." && sleep $((i*10))); \
done
# --- Build stage ---
FROM deps AS builder
WORKDIR /app
COPY frontends/exploded-diagrams/ ./frontends/exploded-diagrams/
RUN cd frontends/exploded-diagrams && npx next build --webpack
# --- Runtime stage ---
FROM node:24-alpine
WORKDIR /app
COPY --from=builder /app/frontends/exploded-diagrams/.next/standalone ./
COPY --from=builder /app/frontends/exploded-diagrams/.next/static ./.next/static
COPY --from=builder /app/frontends/exploded-diagrams/public ./public
ENV NODE_ENV=production
ENV PORT=3000
ENV HOSTNAME="0.0.0.0"
EXPOSE 3000
HEALTHCHECK --interval=15s --timeout=5s --start-period=30s --retries=3 \
CMD wget --quiet --tries=1 --spider http://127.0.0.1:3000/diagrams || exit 1
WORKDIR /app
CMD ["node", "server.js"]