mirror of
https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git
synced 2025-08-14 00:25:46 +02:00
тестd32123
This commit is contained in:
@@ -7,17 +7,15 @@ COPY frontend/package*.json ./
|
|||||||
|
|
||||||
# Очищаем cache и node_modules
|
# Очищаем cache и node_modules
|
||||||
RUN npm cache clean --force
|
RUN npm cache clean --force
|
||||||
RUN rm -rf node_modules
|
RUN rm -rf node_modules package-lock.json
|
||||||
|
|
||||||
# Устанавливаем зависимости
|
# Устанавливаем зависимости
|
||||||
RUN npm install
|
RUN npm install
|
||||||
|
RUN npm install axios@1.6.2
|
||||||
|
|
||||||
# Копируем исходный код
|
# Копируем исходный код
|
||||||
COPY frontend/ .
|
COPY frontend/ .
|
||||||
|
|
||||||
# Создаем .env файл
|
|
||||||
RUN echo "VITE_API_URL=/api" > .env
|
|
||||||
|
|
||||||
# Открываем порт для Vite
|
# Открываем порт для Vite
|
||||||
EXPOSE 5173
|
EXPOSE 5173
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,12 @@ export default defineConfig({
|
|||||||
port: 5173,
|
port: 5173,
|
||||||
watch: {
|
watch: {
|
||||||
usePolling: true
|
usePolling: true
|
||||||
|
},
|
||||||
|
proxy: {
|
||||||
|
'/api': {
|
||||||
|
target: 'http://backend:8000',
|
||||||
|
changeOrigin: true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Reference in New Issue
Block a user