-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yml
More file actions
56 lines (54 loc) · 2.03 KB
/
compose.yml
File metadata and controls
56 lines (54 loc) · 2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
services:
video-nginx:
image: nginx:1.22.1
container_name: video-nginx
restart: always
ports:
# 视频直播,映射srs端口
- ${VIDEO_PORT_HTTPS_0}:${VIDEO_PORT_HTTPS_0}
- ${VIDEO_PORT_HTTPS_1}:${VIDEO_PORT_HTTPS_1}
- ${VIDEO_PORT_HTTPS_2}:${VIDEO_PORT_HTTPS_2}
- ${VIDEO_PORT_HTTPS_3}:${VIDEO_PORT_HTTPS_3}
- ${VIDEO_PORT_HTTPS_4}:${VIDEO_PORT_HTTPS_4}
- ${VIDEO_PORT_HTTPS_5}:${VIDEO_PORT_HTTPS_5}
privileged: true
depends_on:
- srs
- rtp
secrets:
- video-ssl-certificate
- video-ssl-certificate-key
volumes:
#- "${DOCKER_DIR:-/home/docker}/video-nginx/conf/nginx.conf:/etc/nginx/nginx.conf"
# 使用配置文件模板, 后缀需要是.conf.tempalte
# https://hub.docker.com/_/nginx#:~:text=Using%20environment%20variables
#- "${DOCKER_DIR:-/home/docker}/video-nginx/conf/conf.d:/etc/nginx/templates"
- "${DOCKER_DIR:-/home/docker}/video-nginx/html:/usr/share/nginx/html"
- "${DATA_DIR:-/data}/logs/video-nginx:/var/log/nginx"
configs:
- source: nginx.conf
target: /etc/nginx/nginx.conf
# 默认启动https的配置
- source: mdvr-live-https.conf.template
target: /etc/nginx/templates/mdvr-live.conf.template
environment:
- MINIO_HOST=${MINIO_HOST}
- MINIO_PORT=${MINIO_PORT}
- VIDEO_PORT_HTTPS_0=${VIDEO_PORT_HTTPS_0}
- VIDEO_PORT_HTTPS_1=${VIDEO_PORT_HTTPS_1}
- VIDEO_PORT_HTTPS_2=${VIDEO_PORT_HTTPS_2}
- VIDEO_PORT_HTTPS_3=${VIDEO_PORT_HTTPS_3}
- VIDEO_PORT_HTTPS_4=${VIDEO_PORT_HTTPS_4}
- VIDEO_PORT_HTTPS_5=${VIDEO_PORT_HTTPS_5}
secrets:
video-ssl-certificate:
file: ${VIDEO_SSL_CERTIFICATE:?required}.crt
video-ssl-certificate-key:
file: ${VIDEO_SSL_CERTIFICATE:?required}.key
configs:
nginx.conf:
file: ./conf/nginx.conf
443.conf.template:
file: ./conf/conf.d/443.conf.template
mdvr-live-https.conf.template:
file: ./conf/conf.d/mdvr-live-https.conf.template