1
0
mirror of https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git synced 2025-08-14 00:25:46 +02:00

change docker

This commit is contained in:
MoonTestUse1
2024-12-24 00:08:07 +06:00
parent 3660537cd8
commit ab67dee15f
4 changed files with 23 additions and 13 deletions

View File

@@ -2,9 +2,14 @@ FROM python:3.11-slim
WORKDIR /app
COPY requirements.txt .
# Копируем requirements.txt
COPY backend/requirements.txt .
# Устанавливаем зависимости
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
# Копируем исходники
COPY backend/ .
CMD ["uvicorn", "run.py"]
# Запускаем приложение
CMD ["python", "run.py"]

View File

@@ -2,11 +2,18 @@ FROM node:18-alpine as builder
WORKDIR /app
COPY package*.json ./
RUN npm install
# Копируем файлы package.json
COPY frontend/package*.json ./
COPY . .
# Устанавливаем зависимости
RUN npm ci
# Копируем исходники
COPY frontend/ ./
# Собираем приложение
RUN npm run build
# Финальный этап
FROM scratch
COPY --from=builder /app/dist /dist

View File

@@ -7,7 +7,6 @@ server {
location / {
try_files $uri $uri/ /index.html;
add_header Cache-Control "no-store, no-cache, must-revalidate";
}
location /api/ {