mirror of
https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git
synced 2025-08-14 00:25:46 +02:00
change docker
This commit is contained in:
@@ -3,14 +3,12 @@ version: '3.8'
|
|||||||
services:
|
services:
|
||||||
frontend:
|
frontend:
|
||||||
build:
|
build:
|
||||||
context: ./frontend
|
context: .
|
||||||
dockerfile: ../docker/frontend/Dockerfile
|
dockerfile: docker/frontend/Dockerfile
|
||||||
container_name: support-frontend
|
container_name: support-frontend
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
depends_on:
|
depends_on:
|
||||||
- backend
|
- backend
|
||||||
volumes:
|
|
||||||
- frontend_build:/app/dist
|
|
||||||
|
|
||||||
backend:
|
backend:
|
||||||
build:
|
build:
|
||||||
@@ -20,9 +18,8 @@ services:
|
|||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
environment:
|
||||||
- TELEGRAM_BOT_TOKEN=7677506032:AAHEqNUr1lIUfNVbLwaWIaPeKKShsCyz3eo
|
- TELEGRAM_BOT_TOKEN=7677506032:AAHEqNUr1lIUfNVbLwaWIaPeKKShsCyz3eo
|
||||||
- TELEGRAM_CHAT_ID=-1002037023574
|
- TELEGRAM_CHAT_ID=5057752127
|
||||||
volumes:
|
volumes:
|
||||||
- ./backend:/app
|
|
||||||
- sqlite_data:/app/instance
|
- sqlite_data:/app/instance
|
||||||
|
|
||||||
nginx:
|
nginx:
|
||||||
@@ -34,11 +31,10 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
|
- ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
|
||||||
- ./docker/nginx/conf.d:/etc/nginx/conf.d:ro
|
- ./docker/nginx/conf.d:/etc/nginx/conf.d:ro
|
||||||
- frontend_build:/usr/share/nginx/html:ro
|
- ./frontend/dist:/usr/share/nginx/html:ro
|
||||||
depends_on:
|
depends_on:
|
||||||
- frontend
|
- frontend
|
||||||
- backend
|
- backend
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
sqlite_data:
|
sqlite_data:
|
||||||
frontend_build:
|
|
||||||
|
@@ -6,9 +6,11 @@ RUN apt-get update && apt-get install -y \
|
|||||||
gcc \
|
gcc \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& 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
|
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
|
WORKDIR /app
|
||||||
|
|
||||||
# Копируем файлы package.json и package-lock.json
|
# Copy package files
|
||||||
COPY package*.json ./
|
COPY frontend/package*.json ./
|
||||||
|
|
||||||
# Устанавливаем зависимости
|
# Install dependencies
|
||||||
RUN npm install
|
RUN npm install
|
||||||
|
|
||||||
# Копируем исходный код
|
# Copy source code
|
||||||
COPY . .
|
COPY frontend/ .
|
||||||
|
|
||||||
# Собираем приложение
|
# Build the app
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
# Этап копирования
|
# Keep container running and serve the built files
|
||||||
FROM scratch
|
CMD ["npm", "run", "preview"]
|
||||||
COPY --from=build /app/dist /dist
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
upstream backend {
|
upstream backend {
|
||||||
server backend:8000; # Изменено с 8080 на 8000
|
server backend:8000; # Changed from 8080 to 8000
|
||||||
}
|
}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
|
Reference in New Issue
Block a user