Install packages from npmmirror and ignore the oxlint peer conflict.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,3 @@
|
|||||||
|
registry=https://registry.npmmirror.com
|
||||||
|
replace-registry-host=always
|
||||||
|
legacy-peer-deps=true
|
||||||
+7
-7
@@ -2,29 +2,29 @@ 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
|
||||||
|
|
||||||
RUN npm config set registry https://mirror2.chabokan.net/npm/ \
|
ENV NPM_CONFIG_REGISTRY=https://registry.npmmirror.com
|
||||||
&& npm config set replace-registry-host npmjs \
|
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-mintimeout 10000 \
|
||||||
&& npm config set fetch-retry-maxtimeout 120000 \
|
&& npm config set fetch-retry-maxtimeout 120000 \
|
||||||
&& npm config set fetch-timeout 120000 \
|
&& npm config set fetch-timeout 120000 \
|
||||||
&& npm config set fetch-retries 5
|
&& npm config set fetch-retries 5
|
||||||
|
|
||||||
ENV NODE_ENV=development
|
ENV NODE_ENV=development
|
||||||
RUN npm ci --include=dev --foreground-scripts --registry=https://mirror2.chabokan.net/npm/
|
RUN npm ci --include=dev --foreground-scripts --no-audit --no-fund --legacy-peer-deps --registry=https://registry.npmmirror.com
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# نامها باید با Environment و Build-time Arguments در Dokploy یکی باشند
|
# نامها باید با Environment و Build-time Arguments در Dokploy یکی باشند
|
||||||
ARG VITE_API_BASE_URL
|
ARG VITE_API_BASE_URL
|
||||||
ARG VITE_USE_MOCK_AUTH
|
|
||||||
ARG VITE_BASE_PATH
|
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_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