Skip to content

Commit eaa1132

Browse files
committed
use newer nginx version and use variables in dockerfile
1 parent bf19c6d commit eaa1132

File tree

3 files changed

+22
-9
lines changed

3 files changed

+22
-9
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ See a demo here - https://demo.streamplanet.tv/
99

1010
## Installation
1111

12-
Download all the files first:
12+
Clone this repository:
1313

1414
```shell
1515
git clone https://github.com/Athlon1600/nginx-rtmp-server.git
1616
```
1717

18-
Next, you need docker.
18+
Next, you need Docker.
1919

2020
**Windows**
21-
If you are testing this from your local windows computer, download Docker from here:
21+
If you are testing this from your local Windows computer, download Docker from here:
2222
https://docs.docker.com/docker-for-windows/install/
2323

2424
**Linux**

rtmp/Dockerfile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
FROM debian:bullseye-slim
1+
FROM debian:bookworm-slim
2+
3+
## rtmp-module was last updated May 15, 2022
4+
## Nginx version is from 19 Oct 2022
5+
ENV NGINX_VERSION=1.22.1
26

37
RUN apt-get update
48

@@ -12,12 +16,12 @@ RUN apt-get install -y ffmpeg
1216
RUN apt-get install -y curl vim glances
1317

1418
## Install nginx
15-
RUN curl -OL https://nginx.org/download/nginx-1.20.2.tar.gz
16-
RUN tar -zxf nginx-1.20.2.tar.gz
19+
RUN curl -OL https://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz
20+
RUN tar -zxf nginx-${NGINX_VERSION}.tar.gz
1721

1822
RUN curl -OL "https://github.com/sergey-dryabzhinsky/nginx-rtmp-module/archive/dev.tar.gz"
1923
RUN tar -xvz -f "dev.tar.gz" && \
20-
cd nginx-1.20.2 && \
24+
cd nginx-${NGINX_VERSION} && \
2125
./configure \
2226
--prefix=/usr/local/nginx \
2327
--conf-path=/usr/local/nginx/conf/nginx.conf \

rtmp/nginx.conf

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,21 @@ rtmp {
2020
idle_streams off;
2121
chunk_size 4096;
2222

23-
# ingest only. playable only from within docker network
23+
# push your stream to: rtmp://localhost:1935/live/{key}
24+
# playable only from within docker/local network
2425
application live {
2526
live on;
27+
record off;
2628

2729
allow publish all;
28-
allow play 172.0.0.1;
30+
31+
# Allow playback from localhost
32+
allow play 127.0.0.1;
33+
34+
# Allow playback from Docker internal network
2935
allow play 172.16.0.0/12;
36+
37+
# uncomment below to make it playable from anywhere like your VLC media player: rtmp://localhost:1935/live/{key}
3038
# allow play all;
3139

3240
idle_streams off;
@@ -43,6 +51,7 @@ rtmp {
4351
# transcoded bytes from another server should be sent to this app
4452
}
4553

54+
# Below is NOT used
4655
application hls {
4756

4857
live on;

0 commit comments

Comments
 (0)