Skip to content

Commit 19a7a79

Browse files
committed
Update
1 parent 16ace78 commit 19a7a79

File tree

2 files changed

+17
-11
lines changed

2 files changed

+17
-11
lines changed

Dockerfile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
FROM alpine:latest
2+
LABEL maintainer: xml@live.com
23
ENV NGINX_VER=1.17.6
34
RUN mkdir nginx && \
45
cd tmp && \
@@ -14,11 +15,16 @@ RUN mkdir nginx && \
1415
make && \
1516
make install && \
1617
apk add --no-cache --virtual .ffmpeg ffmpeg && \
17-
cd / && \
18+
cd /nginx && \
1819
rm -r /tmp/* && \
1920
apk del .git && \
20-
apk del .buildenv
21-
21+
apk del .buildenv && \
22+
rm conf/nginx.conf && \
23+
cd html && \
24+
mkdir hls hls/transcode dash dash/transcode vod record
25+
WORKDIR /nginx
26+
COPY nginx.conf ./conf/
27+
COPY html/* ./html/
2228
EXPOSE 80
2329
EXPOSE 1935
2430
VOLUME [ "/nginx" ]

conf/nginx.conf

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ rtmp {
6262
exec_kill_signal 9;
6363

6464
record off;
65-
record_path /nginx/record;
65+
record_path /nginx/html/record;
6666
recorder video {
6767
record all;
6868
record_lock on;
@@ -150,7 +150,7 @@ rtmp {
150150
#-ab 96K
151151
#-f flv
152152
#-y rtmp://localhost/transcode/$name_216p
153-
#2>>/root/logs/ffmpeg_dt.log ;
153+
#2>>/nginx/logs/ffmpeg_dt.log ;
154154

155155
# Delete HLS files
156156
exec_publish_done killall -9 ffmpeg ;
@@ -167,7 +167,7 @@ http {
167167
'$status $body_bytes_sent "$http_referer" '
168168
'"$http_user_agent" "$http_x_forwarded_for"';
169169

170-
access_log /root/logs/access.log main;
170+
access_log /nginx/logs/access.log main;
171171

172172
sendfile on;
173173

@@ -179,10 +179,10 @@ http {
179179
listen 80;
180180
server_name localhost;
181181

182-
access_log /root/logs/host.access.log main;
182+
access_log /nginx/logs/host.access.log main;
183183

184184
location / {
185-
root /nginx/html/html;
185+
root /nginx/html;
186186
index index.html index.htm;
187187
}
188188

@@ -191,11 +191,11 @@ http {
191191
error_page 500 502 503 504 /50x.html;
192192

193193
location = /50x.html {
194-
root /nginx/html/html;
194+
root /nginx/html;
195195
}
196196

197197
location = /404.html {
198-
root /nginx/html/html;
198+
root /nginx/html;
199199
}
200200

201201
location /hls {
@@ -231,7 +231,7 @@ http {
231231
}
232232

233233
location /stat.xsl {
234-
root /nginx/html/html;
234+
root /nginx/html;
235235
}
236236
}
237237
}

0 commit comments

Comments
 (0)