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

change project

This commit is contained in:
MoonTestUse1
2024-12-23 22:53:05 +06:00
parent b898fd915d
commit 21c61ce8da
42 changed files with 13 additions and 16 deletions

View File

@@ -3,8 +3,8 @@ version: '3.8'
services:
frontend:
build:
context: .
dockerfile: docker/frontend/Dockerfile
context: ./frontend
dockerfile: ../docker/frontend/Dockerfile
container_name: support-frontend
restart: unless-stopped
depends_on:
@@ -12,13 +12,13 @@ services:
backend:
build:
context: .
dockerfile: docker/backend/Dockerfile
context: ./backend
dockerfile: ../docker/backend/Dockerfile
container_name: support-backend
restart: unless-stopped
environment:
- TELEGRAM_BOT_TOKEN=7677506032:AAHEqNUr1lIUfNVbLwaWIaPeKKShsCyz3eo
- TELEGRAM_CHAT_ID=-1002037023574
- TELEGRAM_BOT_TOKEN=7677506032:AAHB2QtrxKdgUXLWlE2xXaVxs9V7BPz1fhc
- TELEGRAM_CHAT_ID=5057752127
volumes:
- ./backend:/app
- sqlite_data:/app/instance
@@ -29,13 +29,14 @@ services:
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./docker/nginx/conf.d:/etc/nginx/conf.d:ro
- frontend_build:/usr/share/nginx/html
depends_on:
- frontend
- backend
volumes:
sqlite_data:
sqlite_data:
frontend_build:

View File

@@ -14,8 +14,6 @@ COPY . .
# Собираем приложение
RUN npm run build
# Настраиваем nginx
FROM nginx:alpine
COPY --from=build /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
# Копируем собранные файлы в volume
VOLUME ["/dist"]
CMD ["cp", "-r", "/app/dist/.", "/dist/"]

View File

@@ -9,15 +9,13 @@ server {
root /usr/share/nginx/html;
index index.html;
# Обработка статических файлов
location / {
try_files $uri $uri/ /index.html;
add_header Cache-Control "no-cache";
}
# Проксирование API запросов
location /api/ {
proxy_pass http://backend/;
proxy_pass http://backend/api/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';