8e472ac996
CI/CD - ERP Core / scripts (pull_request) Failing after 12m21s
CI/CD - ERP Core / e2e-typecheck (pull_request) Failing after 13m13s
CI/CD - ERP Core / frontend (pull_request) Failing after 14m5s
CI/CD - ERP Core / backend (pull_request) Failing after 14m57s
CI/CD - ERP Core / detect (pull_request) Failing after 13m42s
CI/CD - ERP Core / Build & Deploy (pull_request) Failing after 12m47s
CI/CD - ERP Core / ci-ok (pull_request) Failing after 14m58s
39 lines
1.2 KiB
Docker
39 lines
1.2 KiB
Docker
# ERP frontend image — built on the server by .gitea/workflows/ci-cd.yml (`docker build`), using the
|
|
# same pattern as Client_New_Fe. There are no build args: the app only calls same-origin /api/v1 and
|
|
# Apache routes /api/ straight to ERPCore (docs/40-DEPLOYMENT.md, "Active").
|
|
|
|
FROM node:24-alpine AS deps
|
|
WORKDIR /app
|
|
RUN apk add --no-cache libc6-compat
|
|
COPY package.json package-lock.json ./
|
|
RUN npm ci --no-audit --no-fund
|
|
|
|
FROM node:24-alpine AS builder
|
|
WORKDIR /app
|
|
COPY --from=deps /app/node_modules ./node_modules
|
|
COPY . .
|
|
# Shared 8 GB VPS: keep the build's heap bounded (docker build has no --memory under BuildKit).
|
|
ENV NEXT_TELEMETRY_DISABLED=1 \
|
|
NODE_ENV=production \
|
|
NODE_OPTIONS=--max-old-space-size=2048
|
|
RUN npm run build
|
|
|
|
FROM node:24-alpine AS runner
|
|
WORKDIR /app
|
|
ENV NODE_ENV=production \
|
|
NEXT_TELEMETRY_DISABLED=1 \
|
|
PORT=3000 \
|
|
HOSTNAME=0.0.0.0
|
|
|
|
RUN addgroup --system --gid 1001 nodejs \
|
|
&& adduser --system --uid 1001 nextjs
|
|
|
|
COPY --from=builder --chown=nextjs:nodejs /app/public ./public
|
|
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
|
|
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
|
|
|
|
USER nextjs
|
|
EXPOSE 3000
|
|
|
|
CMD ["node", "server.js"]
|