diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..7c850f3 --- /dev/null +++ b/.npmrc @@ -0,0 +1,2 @@ +registry=https://registry.npmmirror.com +replace-registry-host=always diff --git a/Dockerfile b/Dockerfile index 1d0d614..e4b6d9b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,11 +2,11 @@ FROM node:20 WORKDIR /app -COPY package.json package-lock.json ./ +COPY package.json package-lock.json .npmrc ./ COPY scripts ./scripts -ENV NPM_CONFIG_REGISTRY=https://mirror2.chabokan.net -RUN npm config set registry https://mirror2.chabokan.net/npm/ \ +ENV NPM_CONFIG_REGISTRY=https://registry.npmmirror.com +RUN npm config set registry https://registry.npmmirror.com \ && npm config set replace-registry-host always \ && npm config set fetch-retry-mintimeout 10000 \ && 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 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 . . @@ -27,7 +27,7 @@ ARG VITE_BASE_PATH RUN node scripts/write-docker-vite-env.mjs \ && unset VITE_API_BASE_URL VITE_USE_MOCK_AUTH VITE_BASE_PATH \ - && npm run build + && npm run build-only ENV NODE_ENV=production ENV VITE_BASE_PATH=/