From 18e70cd445fb4631dc11c1c1172c3d9d9318d9d6 Mon Sep 17 00:00:00 2001 From: pratik Date: Thu, 16 Oct 2025 14:25:08 -0500 Subject: [PATCH] Toggle NPM througn env file --- .env.example | 7 ++++--- docker-compose.yml | 5 ++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.env.example b/.env.example index cf72db4..83c1ad7 100644 --- a/.env.example +++ b/.env.example @@ -29,6 +29,7 @@ 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= +# Default: https://registry.npmjs.org/ (public npm registry) +# For restricted environments, set to your custom npm proxy/registry URL +# Example: http://your-nexus-server:8081/repository/npm-proxy/ +NPM_REGISTRY=https://registry.npmjs.org/ diff --git a/docker-compose.yml b/docker-compose.yml index 0fdcc5c..1d97582 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -38,7 +38,10 @@ services: app: container_name: warehouse13-app - build: . + build: + context: . + args: + NPM_REGISTRY: ${NPM_REGISTRY:-https://registry.npmjs.org/} ports: - "8000:8000" environment: