From 92ff889a6f83ac6eb94c80fc92e513113e3c25c9 Mon Sep 17 00:00:00 2001 From: Renan Berto Date: Fri, 25 Nov 2016 10:34:04 -0200 Subject: [PATCH] Add nginx.conf with Dockerfile --- Dockerfile | 3 +++ nginx.conf | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 nginx.conf diff --git a/Dockerfile b/Dockerfile index 6d5ce9b..0b19a3f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,6 +26,9 @@ RUN wget https://github.com/jwilder/docker-gen/releases/download/$DOCKER_GEN_VER COPY . /app/ WORKDIR /app/ +# Add nginx.conf +ADD nginx.conf /etc/nginx/nginx.conf + ENV DOCKER_HOST unix:///tmp/docker.sock VOLUME ["/etc/nginx/certs"] diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..4469c30 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,34 @@ +user nginx; +worker_processes 1; + +error_log /var/log/nginx/error.log warn; +pid /var/run/nginx.pid; + + +events { + worker_connections 1024; +} + + +http { + server_names_hash_bucket_size 128; + proxy_read_timeout 10m; + 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; + #tcp_nopush on; + + keepalive_timeout 65; + + #gzip on; + + include /etc/nginx/conf.d/*.conf; +} +daemon off;