-
Notifications
You must be signed in to change notification settings - Fork 12
/
docker-compose.yaml
114 lines (107 loc) · 2.36 KB
/
docker-compose.yaml
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
services:
app:
build:
context: .
working_dir: "/app"
platform: "linux/amd64"
volumes:
- "./:/app/"
ports:
- "8080:8080"
- "8081:8081"
- "8081:8081/udp"
- "6060:6060"
depends_on:
- haivision_srt
- nginx_rtmp
links:
- haivision_srt
- nginx_rtmp
dev:
build:
context: .
dockerfile: Dockerfile-dev
working_dir: "/app"
platform: "linux/amd64"
volumes:
- "./:/app/"
command: "bash"
ports:
- "8080:8080"
- "8081:8081"
- "8081:8081/udp"
- "6060:6060"
depends_on:
- haivision_srt
- nginx_rtmp
links:
- haivision_srt
- nginx_rtmp
nginx_rtmp:
image: alfg/nginx-rtmp
ports:
- "1935:1935"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf.template
depends_on:
- origin_rtmp
links:
- origin_rtmp
origin_rtmp: # simulating an RTMP flv (h264/aac) live transmission
image: jrottenberg/ffmpeg:4.4-alpine
entrypoint: sh
command: "/scripts/ffmpeg_rtmp.sh"
volumes:
- "./scripts:/scripts"
- "./fonts/0xProto:/usr/share/fonts"
environment:
- RTMP_HOST=nginx_rtmp
- RTMP_PORT=1935
haivision_srt:
build:
context: .
dockerfile: Dockerfile-srt-live
entrypoint: sh
command: "./srt.sh"
working_dir: "/scripts"
volumes:
- "./scripts:/scripts"
environment:
- SRT_LISTENING_PORT=40052
- SRT_UDP_TS_INPUT_HOST=0.0.0.0
- SRT_UDP_TS_INPUT_PORT=1234
ports:
- "40052:40052/udp"
depends_on:
- origin_srt
links:
- origin_srt
origin_srt: # simulating an (h264/aac) mpeg-ts upd origin live transmission
image: jrottenberg/ffmpeg:4.4-alpine
entrypoint: sh
command: "/scripts/ffmpeg_mpegts_udp.sh"
volumes:
- "./scripts:/scripts"
- "./fonts/0xProto:/usr/share/fonts"
environment:
- SRT_INPUT_HOST=haivision_srt
- SRT_INPUT_PORT=1234
- PKT_SIZE=1316
test:
build:
context: .
dockerfile: Dockerfile-dev
working_dir: "/app"
platform: "linux/amd64"
volumes:
- "./:/app/"
command: "go test -v ./..."
lint:
build:
context: .
dockerfile: Dockerfile-dev
working_dir: "/app"
platform: "linux/amd64"
volumes:
- "./:/app/"
command: "golangci-lint run -v"