From 5ffb07152ea25ee1ed6b8b6febfde936a3cfb1a8 Mon Sep 17 00:00:00 2001 From: mclub4 Date: Fri, 24 May 2024 02:53:05 +0900 Subject: [PATCH] =?UTF-8?q?chore=20:=20nginx=20worker=20=EC=84=A4=EC=A0=95?= =?UTF-8?q?=20=ED=8C=8C=EC=9D=BC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- back/nginx/Dockerfile | 3 +++ back/nginx/nginx.conf | 25 +++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 back/nginx/nginx.conf diff --git a/back/nginx/Dockerfile b/back/nginx/Dockerfile index af622f1c49..a8fe784969 100644 --- a/back/nginx/Dockerfile +++ b/back/nginx/Dockerfile @@ -1,3 +1,6 @@ FROM nginx + +#COPY nginx.conf /etc/nginx/nginx.conf COPY default.conf.template /etc/nginx/conf.d/default.conf.template + ENTRYPOINT ["/bin/bash", "-c", "envsubst '${SERVER_NAME}' < /etc/nginx/conf.d/default.conf.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"] diff --git a/back/nginx/nginx.conf b/back/nginx/nginx.conf new file mode 100644 index 0000000000..ff2718a376 --- /dev/null +++ b/back/nginx/nginx.conf @@ -0,0 +1,25 @@ +user nginx; +worker_processes auto; + +worker_rlimit_nofile 8192; + +events { + worker_connections 4096; +} + +http { + include /etc/nginx/mime.types; + default_type application/octet-stream; + + log_format main '$remote_addr - $remote_user [$time_local] "$request" ' + '$status $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for"'; + + access_log /var/log/nginx/access.log main; + + sendfile on; + + keepalive_timeout 65; + + include /etc/nginx/conf.d/*.conf; +}