Changes in Dockerfile and nginx conf

This commit is contained in:
nyan404 committed 2025-03-18 22:28:43 +03:00
1 parent b3ae0298ee
commit 358eee6348
2 files changed
+24 -10

No files matched your search

+11 -6
View File
@@ -1,16 +1,21 @@
# Use the official nginx base image
# Используем официальный образ nginx
FROM nginx
# Copy the site files from the local /web folder to the container's /usr/share/nginx/html folder
# Устанавливаем локаль UTF-8 (решает проблемы внутри контейнера)
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8
# Копируем файлы сайта
COPY ./web /usr/share/nginx/html
# Copy the custom nginx config file
# Копируем кастомный конфиг nginx
COPY nginx.conf /etc/nginx/nginx.conf
# Expose port 80 for HTTP traffic
# Выставляем правильные разрешения (важно для контейнера!)
RUN chmod -R 755 /usr/share/nginx/html && chown -R nginx:nginx /usr/share/nginx/html
# Открываем порты
EXPOSE 80
# Expose port 443 for HTTPs traffic
EXPOSE 443
# Start the nginx server
# Запускаем nginx
CMD ["nginx", "-g", "daemon off;"]