chore: reduced number of workers for nginx

This commit is contained in:
ITQ
2025-07-19 16:59:37 +03:00
parent 3838ad83e6
commit 56657cee9f
3 changed files with 5 additions and 1 deletions
+2
View File
@@ -26,6 +26,8 @@ COPY --from=builder /app/static /usr/share/nginx/html
COPY ../checker/checker_requirements.txt /usr/share/nginx/html COPY ../checker/checker_requirements.txt /usr/share/nginx/html
RUN sed -i 's/worker_processes .*/worker_processes 1;/' /etc/nginx/nginx.conf
HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --start-interval=2s --retries=3 \ HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --start-interval=2s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://127.0.0.1:80/ || exit 1 CMD wget --no-verbose --tries=1 --spider http://127.0.0.1:80/ || exit 1
+2
View File
@@ -18,6 +18,8 @@ FROM nginx:1.28-alpine-slim AS serve
COPY --from=builder /opt/docusaurus/build /usr/share/nginx/html COPY --from=builder /opt/docusaurus/build /usr/share/nginx/html
RUN sed -i 's/worker_processes .*/worker_processes 1;/' /etc/nginx/nginx.conf
EXPOSE 80 EXPOSE 80
CMD ["nginx", "-g", "daemon off;"] CMD ["nginx", "-g", "daemon off;"]
+1 -1
View File
@@ -1,4 +1,4 @@
worker_processes auto; worker_processes 1;
pid /run/nginx.pid; pid /run/nginx.pid;
error_log /var/log/nginx/error.log warn; error_log /var/log/nginx/error.log warn;
include /etc/nginx/modules-enabled/*.conf; include /etc/nginx/modules-enabled/*.conf;