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-25 06:09:01 +06:00
parent 763fe87738
commit 382b280cc9
2 changed files with 9 additions and 19 deletions

View File

@@ -12,22 +12,12 @@ RUN npm run build
FROM nginx:alpine
# Copy configuration files
COPY docker/nginx/nginx.conf /etc/nginx/nginx.conf
# Скопируйте собранные файлы в Nginx
COPY --from=build /app/dist /usr/share/nginx/html
# Скопируйте конфигурацию Nginx
COPY docker/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf
RUN mkdir -p /var/cache/nginx \
/var/cache/nginx/client_temp \
/var/cache/nginx/proxy_temp \
/var/cache/nginx/fastcgi_temp \
/var/cache/nginx/uwsgi_temp \
/var/cache/nginx/scgi_temp \
/var/run \
&& chmod -R 755 /var/cache/nginx \
&& chmod -R 755 /etc/nginx \
&& chown -R nginx:nginx /var/cache/nginx \
&& chown -R nginx:nginx /etc/nginx
EXPOSE 83
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

View File

@@ -1,9 +1,9 @@
server {
listen 80;
server_name localhost;
listen 80;
server_name localhost;
root /usr/share/nginx/html;
index index.html;
root /usr/share/nginx/html;
index index.html;
location / {
try_files $uri $uri/ /index.html;