From 9026cdcb4d0b18b6d4428f9c7a1a5b2b51bfebb3 Mon Sep 17 00:00:00 2001 From: Luca Date: Fri, 18 Sep 2020 21:03:17 +0200 Subject: [PATCH] Add files for image 'nginx-rtmp' --- nginx-rtmp/Dockerfile | 15 +++++++++++++++ nginx-rtmp/docker-entrypoint.sh | 10 ++++++++++ nginx-rtmp/rtmp.conf | 10 ++++++++++ 3 files changed, 35 insertions(+) create mode 100644 nginx-rtmp/Dockerfile create mode 100755 nginx-rtmp/docker-entrypoint.sh create mode 100644 nginx-rtmp/rtmp.conf diff --git a/nginx-rtmp/Dockerfile b/nginx-rtmp/Dockerfile new file mode 100644 index 0000000..9a9f649 --- /dev/null +++ b/nginx-rtmp/Dockerfile @@ -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;"] diff --git a/nginx-rtmp/docker-entrypoint.sh b/nginx-rtmp/docker-entrypoint.sh new file mode 100755 index 0000000..266d125 --- /dev/null +++ b/nginx-rtmp/docker-entrypoint.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +set -e + +if [ "${1#-}" != "$1" ] +then + set -- /usr/sbin/nginx "$@" +fi + +exec "$@" diff --git a/nginx-rtmp/rtmp.conf b/nginx-rtmp/rtmp.conf new file mode 100644 index 0000000..89a836a --- /dev/null +++ b/nginx-rtmp/rtmp.conf @@ -0,0 +1,10 @@ +load_module "modules/ngx_rtmp_module.so"; + +rtmp { + server { + listen 1935; + chunk_size 4000; + + include /etc/nginx/streams.d/*.conf; + } +}