Add files for image 'nginx-rtmp'

This commit is contained in:
Luca 2020-09-18 21:03:17 +02:00
parent 6577077e4a
commit 9026cdcb4d
3 changed files with 35 additions and 0 deletions

15
nginx-rtmp/Dockerfile Normal file
View File

@ -0,0 +1,15 @@
FROM alpine:3.12
RUN apk add --no-cache nginx nginx-mod-rtmp && mkdir -p /etc/nginx/streams.d
COPY docker-entrypoint.sh /
COPY rtmp.conf /etc/nginx/modules/
WORKDIR /var/www/live
EXPOSE 80
STOPSIGNAL SIGTERM
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["-g", "daemon off;"]

10
nginx-rtmp/docker-entrypoint.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/sh
set -e
if [ "${1#-}" != "$1" ]
then
set -- /usr/sbin/nginx "$@"
fi
exec "$@"

10
nginx-rtmp/rtmp.conf Normal file
View File

@ -0,0 +1,10 @@
load_module "modules/ngx_rtmp_module.so";
rtmp {
server {
listen 1935;
chunk_size 4000;
include /etc/nginx/streams.d/*.conf;
}
}