Fix the npm registry URL so Docker can install packages.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,2 @@
|
|||||||
|
registry=https://registry.npmmirror.com
|
||||||
|
replace-registry-host=always
|
||||||
+5
-5
@@ -2,11 +2,11 @@ FROM node:20
|
|||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY package.json package-lock.json ./
|
COPY package.json package-lock.json .npmrc ./
|
||||||
COPY scripts ./scripts
|
COPY scripts ./scripts
|
||||||
|
|
||||||
ENV NPM_CONFIG_REGISTRY=https://mirror2.chabokan.net
|
ENV NPM_CONFIG_REGISTRY=https://registry.npmmirror.com
|
||||||
RUN npm config set registry https://mirror2.chabokan.net/npm/ \
|
RUN npm config set registry https://registry.npmmirror.com \
|
||||||
&& npm config set replace-registry-host always \
|
&& npm config set replace-registry-host always \
|
||||||
&& npm config set fetch-retry-mintimeout 10000 \
|
&& npm config set fetch-retry-mintimeout 10000 \
|
||||||
&& npm config set fetch-retry-maxtimeout 120000 \
|
&& npm config set fetch-retry-maxtimeout 120000 \
|
||||||
@@ -16,7 +16,7 @@ RUN npm config set registry https://mirror2.chabokan.net/npm/ \
|
|||||||
&& npm config set loglevel info
|
&& npm config set loglevel info
|
||||||
|
|
||||||
ENV NODE_ENV=development
|
ENV NODE_ENV=development
|
||||||
RUN npm ci --include=dev --foreground-scripts --no-audit --no-fund --registry=https://mirror2.chabokan.net
|
RUN npm ci --include=dev --foreground-scripts --no-audit --no-fund --registry=https://registry.npmmirror.com
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
@@ -27,7 +27,7 @@ ARG VITE_BASE_PATH
|
|||||||
|
|
||||||
RUN node scripts/write-docker-vite-env.mjs \
|
RUN node scripts/write-docker-vite-env.mjs \
|
||||||
&& unset VITE_API_BASE_URL VITE_USE_MOCK_AUTH VITE_BASE_PATH \
|
&& unset VITE_API_BASE_URL VITE_USE_MOCK_AUTH VITE_BASE_PATH \
|
||||||
&& npm run build
|
&& npm run build-only
|
||||||
|
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
ENV VITE_BASE_PATH=/
|
ENV VITE_BASE_PATH=/
|
||||||
|
|||||||
Reference in New Issue
Block a user