nxtgauge-admin-solid/Dockerfile
Tracewebstudio Dev a13dce546d fix(ci): use internal registry for node:20-alpine base image
- Change FROM node:20-alpine to FROM registry.nxtgauge.com/node:20-alpine
- Update both Dockerfile and Dockerfile.simple
- Fixes Docker Hub rate limiting errors in Woodpecker builds
2026-04-16 19:30:32 +02:00

40 lines
893 B
Docker

# Multi-stage build with memory optimization
FROM node:20-slim AS builder
WORKDIR /app
# Skip browser downloads
ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
ENV CYPRESS_INSTALL_BINARY=0
ENV NODE_ENV=production
# Set API URL for build (create .env file)
RUN echo "GATEWAY_URL=http://localhost:9100" > .env
# Install build dependencies
RUN apt-get update && apt-get install -y python3 make g++ git && rm -rf /var/lib/apt/lists/*
# Copy package files
COPY package*.json ./
# Install dependencies
RUN npm ci --legacy-peer-deps --prefer-offline --no-audit
# Copy source
COPY . .
# Build with memory optimization
ENV NODE_OPTIONS="--max-old-space-size=4096"
RUN npm run build
# Runtime stage
FROM registry.nxtgauge.com/node:20-alpine
WORKDIR /app
# Copy built output
COPY --from=builder /app/.output ./.output
ENV PORT=9202
ENV HOST=0.0.0.0
EXPOSE 9102
CMD ["node", ".output/server/index.mjs"]