Merge pull request #2387 from nginx-proxy/1780
fix: set worker_rlimit_nofile to (worker_connections x 2)
This commit is contained in:
commit
af56ba2254
2 changed files with 8 additions and 4 deletions
|
@ -17,8 +17,10 @@ ENV NGINX_PROXY_VERSION=${NGINX_PROXY_VERSION} \
|
|||
RUN apk add --no-cache --virtual .run-deps bash openssl
|
||||
|
||||
# Configure Nginx
|
||||
RUN sed -i 's/worker_connections 1024/worker_connections 10240/' /etc/nginx/nginx.conf \
|
||||
&& mkdir -p '/etc/nginx/dhparam'
|
||||
RUN sed -i 's/worker_connections.*;$/worker_connections 10240;/' /etc/nginx/nginx.conf \
|
||||
&& sed -i -e '/^\}$/{s//\}\nworker_rlimit_nofile 20480;/;:a' -e '$!N;$!ba' -e '}' /etc/nginx/nginx.conf \
|
||||
&& mkdir -p '/etc/nginx/dhparam' \
|
||||
&& mkdir -p '/etc/nginx/certs'
|
||||
|
||||
# Install Forego + docker-gen
|
||||
COPY --from=forego /usr/local/bin/forego /usr/local/bin/forego
|
||||
|
|
|
@ -14,8 +14,10 @@ ENV NGINX_PROXY_VERSION=${NGINX_PROXY_VERSION} \
|
|||
DOCKER_HOST=unix:///tmp/docker.sock
|
||||
|
||||
# Configure Nginx
|
||||
RUN sed -i 's/worker_connections 1024/worker_connections 10240/' /etc/nginx/nginx.conf \
|
||||
&& mkdir -p '/etc/nginx/dhparam'
|
||||
RUN sed -i 's/worker_connections.*;$/worker_connections 10240;/' /etc/nginx/nginx.conf \
|
||||
&& sed -i -e '/^\}$/{s//\}\nworker_rlimit_nofile 20480;/;:a' -e '$!N;$!ba' -e '}' /etc/nginx/nginx.conf \
|
||||
&& mkdir -p '/etc/nginx/dhparam' \
|
||||
&& mkdir -p '/etc/nginx/certs'
|
||||
|
||||
# Install Forego + docker-gen
|
||||
COPY --from=forego /usr/local/bin/forego /usr/local/bin/forego
|
||||
|
|
Loading…
Reference in a new issue