File tree Expand file tree Collapse file tree 2 files changed +17
-11
lines changed Expand file tree Collapse file tree 2 files changed +17
-11
lines changed Original file line number Diff line number Diff line change 1
1
FROM alpine:latest
2
+ LABEL maintainer: xml@live.com
2
3
ENV NGINX_VER=1.17.6
3
4
RUN mkdir nginx && \
4
5
cd tmp && \
@@ -14,11 +15,16 @@ RUN mkdir nginx && \
14
15
make && \
15
16
make install && \
16
17
apk add --no-cache --virtual .ffmpeg ffmpeg && \
17
- cd / && \
18
+ cd /nginx && \
18
19
rm -r /tmp/* && \
19
20
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/
22
28
EXPOSE 80
23
29
EXPOSE 1935
24
30
VOLUME [ "/nginx" ]
Original file line number Diff line number Diff line change 62
62
exec_kill_signal 9;
63
63
64
64
record off;
65
- record_path /nginx/record;
65
+ record_path /nginx/html/ record;
66
66
recorder video {
67
67
record all;
68
68
record_lock on;
@@ -150,7 +150,7 @@ rtmp {
150
150
#-ab 96K
151
151
#-f flv
152
152
#-y rtmp://localhost/transcode/$name_216p
153
- #2>>/root /logs/ffmpeg_dt.log ;
153
+ #2>>/nginx /logs/ffmpeg_dt.log ;
154
154
155
155
# Delete HLS files
156
156
exec_publish_done killall -9 ffmpeg ;
@@ -167,7 +167,7 @@ http {
167
167
'$status $body_bytes_sent "$http_referer " '
168
168
'"$http_user_agent " "$http_x_forwarded_for "' ;
169
169
170
- access_log /root /logs/access.log main ;
170
+ access_log /nginx /logs/access.log main ;
171
171
172
172
sendfile on ;
173
173
@@ -179,10 +179,10 @@ http {
179
179
listen 80 ;
180
180
server_name localhost;
181
181
182
- access_log /root /logs/host.access.log main ;
182
+ access_log /nginx /logs/host.access.log main ;
183
183
184
184
location / {
185
- root /nginx/html/html ;
185
+ root /nginx/html;
186
186
index index.html index.htm;
187
187
}
188
188
@@ -191,11 +191,11 @@ http {
191
191
error_page 500 502 503 504 /50x.html;
192
192
193
193
location = /50x.html {
194
- root /nginx/html/html ;
194
+ root /nginx/html;
195
195
}
196
196
197
197
location = /404.html {
198
- root /nginx/html/html ;
198
+ root /nginx/html;
199
199
}
200
200
201
201
location /hls {
@@ -231,7 +231,7 @@ http {
231
231
}
232
232
233
233
location /stat.xsl {
234
- root /nginx/html/html ;
234
+ root /nginx/html;
235
235
}
236
236
}
237
237
}
You can’t perform that action at this time.
0 commit comments