-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
103 lines (95 loc) · 2.67 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
version: "3.8"
services:
######################################
# MinIO S3-Compatible Service
######################################
s3minio:
image: "quay.io/minio/minio:latest"
network_mode: "host"
hostname: "s3minio"
container_name: "s3minio"
env_file:
- "configs/config.env"
volumes:
- "./data:/data:rw"
command: >
server /data
--console-address ":9001"
--anonymous --json --quiet
--certs-dir /root/.minio/certs
# This ensures the Rust app does not start
# before MinIO is ready (simple dependency).
healthcheck:
test: ["CMD", "curl", "-f", "127.0.0.1:9000/minio/health/live"]
interval: 5s
timeout: 5s
retries: 5
restart: unless-stopped
######################################
# HLS M3U8 Playlist Service
######################################
hls-http-server:
image: docker.io/nginx:alpine
container_name: hls-http-server
network_mode: "host"
volumes:
- ./hls:/usr/share/nginx/html:ro # Serve HLS files from the local "hls" folder
- ./configs/nginx.conf:/etc/nginx/nginx.conf:ro
restart: unless-stopped
logging:
driver: json-file
options:
max-size: "10m" # Rotate logs when they reach 10MB
max-file: "3" # Keep up to 3 log files
######################################
# Rust-Based Capture & HLS Service
######################################
udp-to-hls:
network_mode: "host"
hostname: "udp-to-hls"
# image: docker.io/groovybits/mpegts_to_s3:latest
build:
context: .
dockerfile: Dockerfile
args:
ENABLE_DEBUG: "false"
container_name: "udp-to-hls"
cap_add:
- NET_RAW
- NET_ADMIN
- SYS_ADMIN
- BPF
privileged: true # Required for eBPF and Pcap
env_file:
- "./configs/config.env"
# Mount local 'hls' directory as the working directory
# where mpegts_to_s3 will write its files.
volumes:
- "./hls:/app/hls:rw"
depends_on:
- s3minio
restart: unless-stopped
entrypoint: ["/app/entrypoint_udp-to-hls.sh"]
######################################
# Rust-Based HLS to UDP Service
######################################
hls-to-udp:
network_mode: "host"
hostname: "hls-to-udp"
# image: docker.io/groovybits/mpegts_to_s3:latest
build:
context: .
dockerfile: Dockerfile
args:
ENABLE_DEBUG: "false"
container_name: "hls-to-udp"
env_file:
- "./configs/config.env"
volumes:
- "./hls:/app/hls:rw"
depends_on:
- s3minio
- udp-to-hls
- hls-http-server
restart: unless-stopped
entrypoint: ["/app/entrypoint_hls-to-udp.sh"]