mirror of
https://github.com/vimagick/dockerfiles.git
synced 2025-02-03 13:21:35 +02:00
update nginx
This commit is contained in:
parent
09f15d569e
commit
b0724f785e
@ -5,10 +5,12 @@
|
|||||||
FROM alpine
|
FROM alpine
|
||||||
MAINTAINER kev <noreply@datageek.info>
|
MAINTAINER kev <noreply@datageek.info>
|
||||||
|
|
||||||
RUN apk add -U nginx \
|
RUN set -xe \
|
||||||
|
&& apk add -U nginx \
|
||||||
&& rm -rf /var/cache/apk/*
|
&& rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
VOLUME /usr/share/nginx/html
|
VOLUME /usr/share/nginx/html
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
CMD ["nginx", "-g", "daemon off;"]
|
CMD ["nginx", "-g", "daemon off;"]
|
||||||
|
@ -1,13 +1,15 @@
|
|||||||
nginx
|
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
|
IMAP protocols, as well as a load balancer, HTTP cache, and a web server
|
||||||
(origin server).
|
(origin server).
|
||||||
|
|
||||||
## Static Website
|
## Static Website
|
||||||
|
|
||||||
docker-compose.yml
|
File: docker-compose.yml
|
||||||
|
|
||||||
```
|
```
|
||||||
nginx:
|
nginx:
|
||||||
@ -22,7 +24,7 @@ nginx:
|
|||||||
|
|
||||||
## Website Proxy
|
## Website Proxy
|
||||||
|
|
||||||
docker-compose.yml
|
File: docker-compose.yml
|
||||||
|
|
||||||
```
|
```
|
||||||
nginx:
|
nginx:
|
||||||
@ -38,7 +40,7 @@ nginx:
|
|||||||
> Password file can be generated by:
|
> Password file can be generated by:
|
||||||
>> `htpasswd -b -c ./nginx/htpasswd username password`
|
>> `htpasswd -b -c ./nginx/htpasswd username password`
|
||||||
|
|
||||||
nginx.conf
|
File: nginx.conf
|
||||||
|
|
||||||
```
|
```
|
||||||
user nginx;
|
user nginx;
|
||||||
@ -75,7 +77,7 @@ http {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
default
|
File: default
|
||||||
|
|
||||||
```
|
```
|
||||||
server {
|
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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user