diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..642d2fb --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM alpine:latest + +RUN apk add nginx nginx-mod-rtmp + +COPY nginx.conf /etc/nginx + +CMD ["/usr/sbin/nginx"] diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..d656d3e --- /dev/null +++ b/build.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +docker build -t nginx-rtmp . diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..c5acfd0 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,6 @@ +services: + nginx: + image: nginx-rtmp + restart: always + expose: + - 1935:1935 diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..24fb031 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,22 @@ +load_module modules/ngx_rtmp_module.so; + +user root root; +worker_processes 2; +pid /var/run/nginx.pid; +daemon off; + +events { + worker_connections 2000; +} + +rtmp { + server { + listen 1935; + chunk_size 8192; + + application live { + live on; + record off; + } + } +}