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; +}