1
0
mirror of https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git synced 2025-08-14 00:25:46 +02:00
This commit is contained in:
MoonTestUse1
2024-12-24 02:34:33 +06:00
parent 5e4b459b21
commit 022dcbcbdd
2 changed files with 14 additions and 14 deletions

View File

@@ -3,11 +3,11 @@ FROM node:18-alpine as build
WORKDIR /app
# Copy package files
COPY frontend/package*.json ./
COPY package*.json ./
RUN npm install
# Copy source code
COPY frontend/ .
COPY . .
# Build the app
RUN npm run build
@@ -17,9 +17,11 @@ FROM nginx:alpine
# Copy built files
COPY --from=build /app/dist /usr/share/nginx/html
# Copy nginx configurations
COPY docker/nginx/nginx.conf /etc/nginx/nginx.conf
COPY docker/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf
# Create nginx config directory
RUN mkdir -p /etc/nginx/conf.d
# Copy nginx configuration
COPY ../docker/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf
# Create required directories and set permissions
RUN mkdir -p /var/cache/nginx \
@@ -37,4 +39,7 @@ RUN mkdir -p /var/cache/nginx \
/var/cache/nginx/scgi_temp \
/var/run
# Remove user directive from nginx config
RUN sed -i '/user/d' /etc/nginx/nginx.conf
CMD ["nginx", "-g", "daemon off;"]