Match the Montify Docker setup and use the Nademitex domain.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+1
-1
@@ -1,2 +1,2 @@
|
||||
VITE_API_BASE_URL=https://parche.montest.ir/server/api
|
||||
VITE_API_BASE_URL=https://nademitex.montest.ir/server/api
|
||||
VITE_USE_MOCK_AUTH=false
|
||||
|
||||
+1
-2
@@ -1,4 +1,4 @@
|
||||
VITE_API_BASE_URL=https://parche.montest.ir/server/api
|
||||
VITE_API_BASE_URL=https://nademitex.montest.ir/server/api
|
||||
|
||||
# سرور محلی (بعد از migrate + seed):
|
||||
# VITE_API_BASE_URL=http://127.0.0.1:3000/api
|
||||
@@ -7,4 +7,3 @@ VITE_API_BASE_URL=https://parche.montest.ir/server/api
|
||||
# VITE_API_BASE_URL=/server/api
|
||||
|
||||
VITE_USE_MOCK_AUTH=false
|
||||
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
VITE_API_BASE_URL=https://parche.montest.ir/server/api
|
||||
VITE_API_BASE_URL=https://nademitex.montest.ir/server/api
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
registry=https://registry.npmmirror.com
|
||||
replace-registry-host=always
|
||||
+7
-10
@@ -1,22 +1,19 @@
|
||||
FROM node:20
|
||||
FROM docker.iranserver.com/node:20
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json package-lock.json .npmrc ./
|
||||
COPY package.json package-lock.json ./
|
||||
COPY scripts ./scripts
|
||||
|
||||
ENV NPM_CONFIG_REGISTRY=https://registry.npmmirror.com
|
||||
RUN npm config set registry https://registry.npmmirror.com \
|
||||
&& npm config set replace-registry-host always \
|
||||
RUN npm config set registry https://mirror2.chabokan.net/npm/ \
|
||||
&& npm config set replace-registry-host npmjs \
|
||||
&& npm config set fetch-retry-mintimeout 10000 \
|
||||
&& npm config set fetch-retry-maxtimeout 120000 \
|
||||
&& npm config set fetch-timeout 120000 \
|
||||
&& npm config set fetch-retries 5 \
|
||||
&& npm config set progress true \
|
||||
&& npm config set loglevel info
|
||||
&& npm config set fetch-retries 5
|
||||
|
||||
ENV NODE_ENV=development
|
||||
RUN npm ci --include=dev --foreground-scripts --no-audit --no-fund --registry=https://registry.npmmirror.com
|
||||
RUN npm ci --include=dev --foreground-scripts --registry=https://mirror2.chabokan.net/npm/
|
||||
|
||||
COPY . .
|
||||
|
||||
@@ -27,7 +24,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-only
|
||||
&& npm run build
|
||||
|
||||
ENV NODE_ENV=production
|
||||
ENV VITE_BASE_PATH=/
|
||||
|
||||
@@ -34,7 +34,7 @@ for (const key of keys) {
|
||||
}
|
||||
|
||||
if (!merged.VITE_API_BASE_URL) {
|
||||
merged.VITE_API_BASE_URL = 'https://parche.montest.ir/server/api'
|
||||
merged.VITE_API_BASE_URL = 'https://nademitex.montest.ir/server/api'
|
||||
}
|
||||
|
||||
if (!merged.VITE_USE_MOCK_AUTH) {
|
||||
|
||||
@@ -2,7 +2,7 @@ const TOKEN_KEY = 'ft_access_token'
|
||||
|
||||
export function getApiBaseUrl(): string {
|
||||
return (import.meta.env.VITE_API_BASE_URL as string | undefined)?.replace(/\/$/, '')
|
||||
|| 'https://parche.montest.ir/server/api'
|
||||
|| 'https://nademitex.montest.ir/server/api'
|
||||
}
|
||||
|
||||
export function getAccessToken(): string | null {
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ export default defineConfig(({ mode }) => ({
|
||||
server: {
|
||||
proxy: {
|
||||
'/server/api': {
|
||||
target: 'https://parche.montest.ir',
|
||||
target: 'https://nademitex.montest.ir',
|
||||
changeOrigin: true,
|
||||
secure: true,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user