From 7c19291ba9c2b5c1df6d8a8d8c1dba570833c3a0 Mon Sep 17 00:00:00 2001 From: Stepan Vladovskiy Date: Sun, 7 Apr 2024 13:45:59 -0300 Subject: [PATCH] feat: nginx worker events config in Dockerfile --- Dockerfile | 3 +++ nginx.conf.sigil | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index f9d4a4b4..9003e1a3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,6 +15,9 @@ COPY pyproject.toml /app/ RUN pip install poetry && \ poetry config virtualenvs.create false && \ poetry install --no-root --only main + +# Modify the nginx.conf file to add the events block +RUN echo "events { worker_connections 1024; }" >> /etc/nginx/nginx.conf # Copy the rest of the application COPY . /app diff --git a/nginx.conf.sigil b/nginx.conf.sigil index c10f7d8e..48f194f9 100644 --- a/nginx.conf.sigil +++ b/nginx.conf.sigil @@ -10,10 +10,6 @@ map $http_origin $allow_origin { default ""; } -events { - worker_connections 1024; -} - proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=my_cache:10m max_size=1g inactive=60m use_temp_path=off;