From b0724f785e7e40341ce343ec05f5f15ca1923940 Mon Sep 17 00:00:00 2001 From: kev Date: Wed, 24 Feb 2016 11:23:49 +0800 Subject: [PATCH] update nginx --- nginx/Dockerfile | 4 +++- nginx/README.md | 28 +++++++++++++++++++++++----- 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/nginx/Dockerfile b/nginx/Dockerfile index 5606658..1960c80 100644 --- a/nginx/Dockerfile +++ b/nginx/Dockerfile @@ -5,10 +5,12 @@ FROM alpine MAINTAINER kev -RUN apk add -U nginx \ +RUN set -xe \ + && apk add -U nginx \ && rm -rf /var/cache/apk/* VOLUME /usr/share/nginx/html + EXPOSE 80 CMD ["nginx", "-g", "daemon off;"] diff --git a/nginx/README.md b/nginx/README.md index a78be70..f12d228 100644 --- a/nginx/README.md +++ b/nginx/README.md @@ -1,13 +1,15 @@ nginx ===== -`Nginx` is an open source reverse proxy server for HTTP, HTTPS, SMTP, POP3, and +![](https://badge.imagelayers.io/vimagick/nginx:latest.svg) + +[Nginx][1] is an open source reverse proxy server for HTTP, HTTPS, SMTP, POP3, and IMAP protocols, as well as a load balancer, HTTP cache, and a web server (origin server). ## Static Website -docker-compose.yml +File: docker-compose.yml ``` nginx: @@ -22,7 +24,7 @@ nginx: ## Website Proxy -docker-compose.yml +File: docker-compose.yml ``` nginx: @@ -38,7 +40,7 @@ nginx: > Password file can be generated by: >> `htpasswd -b -c ./nginx/htpasswd username password` -nginx.conf +File: nginx.conf ``` user nginx; @@ -75,7 +77,7 @@ http { } ``` -default +File: default ``` server { @@ -113,3 +115,19 @@ server { } } ``` + +File: [rtmp][1] + +``` +rtmp { + server { + listen 1935; + application live { + live on; + } + } +} +``` + +[1]: http://nginx.org/ +[2]: https://github.com/arut/nginx-rtmp-module/wiki/Directives