Skip to content

Commit 923edcd

Browse files
ipcjsth-ci
authored andcommitted
refactor: 将video-nginx的配置迁移到nginx中
wip: 迁移时, 覆写错误
1 parent 8f982f6 commit 923edcd

14 files changed

+62
-200
lines changed

nginx/compose.video-minio.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
services:
2+
nginx:
3+
configs:
4+
- source: video-minio.conf.template
5+
target: /etc/nginx/templates/video-minio.conf.template
6+
environment:
7+
- MINIO_HOST=${MINIO_HOST}
8+
- MINIO_PORT=${MINIO_PORT}
9+
10+
configs:
11+
video-minio.conf.template:
12+
file: ./conf/conf.d/video-minio.conf.template

nginx/compose.video.http.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
services:
2+
nginx:
3+
configs:
4+
# 使用http的配置覆盖
5+
- source: video-http.conf.template
6+
target: /etc/nginx/templates/video.conf.template
7+
8+
configs:
9+
video-http.conf.template:
10+
file: ./conf/conf.d/video-http.conf.template

nginx/compose.video.https.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
services:
2+
nginx:
3+
# file://./compose.video.yml 已经是https的配置了, 不需要覆写其他设置, 该文件只是为了和 file://./compose.video.http.yml 对齐

nginx/compose.video.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
services:
2+
nginx:
3+
ports:
4+
# 视频直播,映射srs端口
5+
- ${VIDEO_PORT_HTTPS_0}:${VIDEO_PORT_HTTPS_0}
6+
- ${VIDEO_PORT_HTTPS_1}:${VIDEO_PORT_HTTPS_1}
7+
- ${VIDEO_PORT_HTTPS_2}:${VIDEO_PORT_HTTPS_2}
8+
- ${VIDEO_PORT_HTTPS_3}:${VIDEO_PORT_HTTPS_3}
9+
- ${VIDEO_PORT_HTTPS_4}:${VIDEO_PORT_HTTPS_4}
10+
- ${VIDEO_PORT_HTTPS_5}:${VIDEO_PORT_HTTPS_5}
11+
depends_on:
12+
- srs
13+
- rtp
14+
secrets:
15+
- video-ssl-certificate
16+
- video-ssl-certificate-key
17+
configs:
18+
# 默认启动https的配置
19+
- source: video-https.conf.template
20+
target: /etc/nginx/templates/video.conf.template
21+
environment:
22+
- VIDEO_PORT_HTTPS_0=${VIDEO_PORT_HTTPS_0}
23+
- VIDEO_PORT_HTTPS_1=${VIDEO_PORT_HTTPS_1}
24+
- VIDEO_PORT_HTTPS_2=${VIDEO_PORT_HTTPS_2}
25+
- VIDEO_PORT_HTTPS_3=${VIDEO_PORT_HTTPS_3}
26+
- VIDEO_PORT_HTTPS_4=${VIDEO_PORT_HTTPS_4}
27+
- VIDEO_PORT_HTTPS_5=${VIDEO_PORT_HTTPS_5}
28+
29+
secrets:
30+
video-ssl-certificate:
31+
file: ${VIDEO_SSL_CERTIFICATE:?required}.crt
32+
video-ssl-certificate-key:
33+
file: ${VIDEO_SSL_CERTIFICATE:?required}.key
34+
35+
configs:
36+
video-https.conf.template:
37+
file: ./conf/conf.d/video-https.conf.template
File renamed without changes.
File renamed without changes.
File renamed without changes.

video-nginx/.env

Lines changed: 0 additions & 1 deletion
This file was deleted.

video-nginx/compose.http.yml

Lines changed: 0 additions & 10 deletions
This file was deleted.

video-nginx/compose.minio.yml

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)