diff --git a/.env.example b/.env.example index a132dd7..cf72db4 100644 --- a/.env.example +++ b/.env.example @@ -27,3 +27,8 @@ MINIO_SECURE=false API_HOST=0.0.0.0 API_PORT=8000 MAX_UPLOAD_SIZE=524288000 + +# NPM Configuration (for frontend build) +# Leave blank or set to https://registry.npmjs.org/ for default npm registry +# Set to your custom npm proxy/registry URL if needed (e.g., http://your-nexus-server:8081/repository/npm-proxy/) +NPM_REGISTRY= diff --git a/Dockerfile.frontend b/Dockerfile.frontend index 981c0e3..f4e6bc4 100644 --- a/Dockerfile.frontend +++ b/Dockerfile.frontend @@ -1,11 +1,19 @@ # Multi-stage build for Angular frontend FROM node:24-alpine AS build +# Accept npm registry as build argument +ARG NPM_REGISTRY=https://registry.npmjs.org/ + WORKDIR /app # Copy package files COPY frontend/package*.json ./ +# Configure npm registry if custom one is provided +RUN if [ "$NPM_REGISTRY" != "https://registry.npmjs.org/" ]; then \ + npm config set registry "$NPM_REGISTRY"; \ + fi + # Install dependencies RUN npm ci diff --git a/docker-compose.yml b/docker-compose.yml index 0c92e60..a5c9885 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -61,6 +61,8 @@ services: build: context: . dockerfile: Dockerfile.frontend + args: + NPM_REGISTRY: ${NPM_REGISTRY:-https://registry.npmjs.org/} ports: - "80:80" depends_on: