From 595f604379c33488cd092234b8df6911ab7cb7ea Mon Sep 17 00:00:00 2001 From: Roman Tarnavski Date: Sat, 7 May 2016 17:46:45 +1000 Subject: [PATCH] - added `nginx.conf` to provide greater flexibility of configuration (ie. listening port) - reverted to port 8080 for the docker image --- Dockerfile | 3 ++- README.md | 2 +- nginx.conf | 24 ++++++++++++++++++++++++ 3 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 nginx.conf diff --git a/Dockerfile b/Dockerfile index b9a1ac4a..a0d7e953 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,8 +4,9 @@ MAINTAINER Roman Tarnavski RUN apk add --update nginx +COPY nginx.conf /etc/nginx/ ADD ./dist/ /usr/share/nginx/html -EXPOSE 80 +EXPOSE 8080 CMD nginx -g 'daemon off;' \ No newline at end of file diff --git a/README.md b/README.md index 8cf00e59..3f9f1763 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ To build swagger-ui using a docker container: ``` docker build -t swagger-ui-builder . -docker run -p 80:80 swagger-ui-builder +docker run -p 80:8080 swagger-ui-builder ``` This will start Swagger UI at `http://localhost`. diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 00000000..3a4b0505 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,24 @@ +worker_processes 1; + +events { + worker_connections 1024; +} + +http { + include mime.types; + default_type application/octet-stream; + + sendfile on; + + keepalive_timeout 65; + + server { + listen 8080; + server_name localhost; + + location / { + root html; + index index.html index.htm; + } + } +} \ No newline at end of file