mirror of
https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git
synced 2025-08-14 00:25:46 +02:00
1:33
This commit is contained in:
@@ -3,9 +3,10 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: docker/frontend/Dockerfile
|
dockerfile: docker/frontend/Dockerfile
|
||||||
container_name: frontend
|
container_name: support-frontend
|
||||||
networks:
|
restart: unless-stopped
|
||||||
- app-network
|
depends_on:
|
||||||
|
- backend
|
||||||
|
|
||||||
backend:
|
backend:
|
||||||
build:
|
build:
|
||||||
@@ -22,17 +23,16 @@ services:
|
|||||||
- app-network
|
- app-network
|
||||||
|
|
||||||
nginx:
|
nginx:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: docker/nginx/Dockerfile
|
dockerfile: docker/nginx/Dockerfile
|
||||||
container_name: nginx
|
container_name: support-nginx
|
||||||
ports:
|
restart: unless-stopped
|
||||||
- "80:80"
|
ports:
|
||||||
depends_on:
|
- "80:80"
|
||||||
- frontend
|
depends_on:
|
||||||
- backend
|
- frontend
|
||||||
networks:
|
- backend
|
||||||
- app-network
|
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
app-network:
|
app-network:
|
||||||
|
|||||||
@@ -3,26 +3,29 @@ FROM node:18-alpine as build
|
|||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Copy package files
|
# Копируем package.json и package-lock.json
|
||||||
COPY frontend/package*.json ./
|
COPY frontend/package*.json ./
|
||||||
|
|
||||||
# Install dependencies
|
# Устанавливаем зависимости
|
||||||
RUN npm ci
|
RUN npm install
|
||||||
|
|
||||||
# Copy source code
|
# Копируем исходный код
|
||||||
COPY frontend/ ./
|
COPY frontend/ ./
|
||||||
|
|
||||||
# Build the app
|
# Собираем приложение
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
# Production stage
|
# Production stage
|
||||||
FROM nginx:alpine
|
FROM nginx:alpine
|
||||||
|
|
||||||
# Copy built files
|
# Копируем собранные файлы
|
||||||
COPY --from=build /app/dist /usr/share/nginx/html
|
COPY --from=build /app/dist /usr/share/nginx/html/
|
||||||
|
|
||||||
# Add nginx config
|
# Удаляем дефолтную страницу nginx
|
||||||
COPY docker/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf
|
RUN rm -rf /usr/share/nginx/html/50x.html
|
||||||
|
|
||||||
|
# Копируем конфигурацию nginx
|
||||||
|
COPY docker/nginx/conf.d/default.conf /etc/nginx/conf.d/
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user