mirror of
https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git
synced 2025-08-14 00:25:46 +02:00
change docker
This commit is contained in:
@@ -6,9 +6,11 @@ RUN apt-get update && apt-get install -y \
|
||||
gcc \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY backend/requirements.txt .
|
||||
# Copy requirements first for better caching
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
COPY backend .
|
||||
# Copy the rest of the application
|
||||
COPY . .
|
||||
|
||||
CMD ["python", "run.py"]
|
||||
CMD ["python", "run.py"]
|
||||
|
@@ -1,19 +1,18 @@
|
||||
FROM node:18-alpine as build
|
||||
FROM node:18-alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Копируем файлы package.json и package-lock.json
|
||||
COPY package*.json ./
|
||||
# Copy package files
|
||||
COPY frontend/package*.json ./
|
||||
|
||||
# Устанавливаем зависимости
|
||||
# Install dependencies
|
||||
RUN npm install
|
||||
|
||||
# Копируем исходный код
|
||||
COPY . .
|
||||
# Copy source code
|
||||
COPY frontend/ .
|
||||
|
||||
# Собираем приложение
|
||||
# Build the app
|
||||
RUN npm run build
|
||||
|
||||
# Этап копирования
|
||||
FROM scratch
|
||||
COPY --from=build /app/dist /dist
|
||||
# Keep container running and serve the built files
|
||||
CMD ["npm", "run", "preview"]
|
||||
|
@@ -1,5 +1,5 @@
|
||||
upstream backend {
|
||||
server backend:8000; # Изменено с 8080 на 8000
|
||||
server backend:8000; # Changed from 8080 to 8000
|
||||
}
|
||||
|
||||
server {
|
||||
|
Reference in New Issue
Block a user