Skip to content

Commit 44b99be

Browse files
committed
Initial commit
0 parents  commit 44b99be

File tree

2 files changed

+58
-0
lines changed

2 files changed

+58
-0
lines changed

Dockerfile

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FROM alpine
2+
3+
RUN apk add --no-cache nginx nginx-mod-rtmp ffmpeg && \
4+
mkdir -p /usr/share/nginx/html/live/hls
5+
6+
ADD nginx.conf /etc/nginx/

nginx.conf

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
2+
3+
include /etc/nginx/modules/*.conf;
4+
5+
user nginx;
6+
worker_processes auto;
7+
8+
error_log /var/log/nginx/error.log warn;
9+
pid /var/run/nginx.pid;
10+
11+
12+
events {
13+
worker_connections 1024;
14+
}
15+
16+
17+
http {
18+
include /etc/nginx/mime.types;
19+
default_type application/octet-stream;
20+
21+
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
22+
'$status $body_bytes_sent "$http_referer" '
23+
'"$http_user_agent" "$http_x_forwarded_for"';
24+
25+
access_log /var/log/nginx/access.log main;
26+
27+
sendfile on;
28+
#tcp_nopush on;
29+
30+
keepalive_timeout 65;
31+
32+
#gzip on;
33+
34+
include /etc/nginx/conf.d/*.conf;
35+
}
36+
37+
rtmp {
38+
server {
39+
listen 1935;
40+
chunk_size 4096;
41+
access_log /var/log/nginx/rtmp_access.log;
42+
43+
application live {
44+
live on;
45+
hls on;
46+
record off;
47+
hls_path /usr/share/nginx/html/live/hls;
48+
hls_fragment 1s;
49+
hls_type live;
50+
}
51+
}
52+
}

0 commit comments

Comments
 (0)