-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
108 lines (100 loc) · 2.79 KB
/
docker-compose.yml
File metadata and controls
108 lines (100 loc) · 2.79 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
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
services:
frontend:
image: bangertech/bambucam-frontend:latest
restart: unless-stopped
network_mode: "host"
backend:
image: bangertech/bambucam-backend:latest
restart: unless-stopped
volumes:
- type: bind
source: ./data
target: /app/data
bind:
create_host_path: true
- type: bind
source: ./logs
target: /app/logs
bind:
create_host_path: true
- type: bind
source: ./data/go2rtc
target: /app/data/go2rtc
bind:
create_host_path: true
environment:
- LOG_LEVEL=DEBUG
network_mode: "host"
nginx:
image: nginx:alpine
network_mode: "host"
restart: unless-stopped
command: >
/bin/sh -c "echo 'worker_processes auto;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
location / {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $$http_upgrade;
proxy_set_header Connection \"upgrade\";
proxy_set_header Host $$host;
}
location /api {
proxy_pass http://localhost:4000;
proxy_http_version 1.1;
proxy_set_header Host $$host;
}
location /go2rtc/ {
proxy_pass http://localhost:1984/;
proxy_http_version 1.1;
proxy_set_header Upgrade $$http_upgrade;
proxy_set_header Connection \"upgrade\";
proxy_set_header Host $$host;
}
}
}' > /etc/nginx/nginx.conf && nginx -g 'daemon off;'"
depends_on:
- frontend
- backend
- go2rtc
go2rtc:
image: alexxit/go2rtc
container_name: go2rtc
restart: unless-stopped
network_mode: host
volumes:
- type: bind
source: ./data/go2rtc
target: /config
bind:
create_host_path: true
environment:
- GO2RTC_CONFIG=/config/go2rtc.yaml
- GO2RTC_API=listen=:1984
- GO2RTC_API_BASE=/go2rtc
- GO2RTC_LOG_LEVEL=debug
command: >
/bin/sh -c "
mkdir -p /config &&
touch /config/go2rtc.yaml &&
chmod 777 /config/go2rtc.yaml &&
echo 'api:' > /config/go2rtc.yaml &&
echo ' listen: :1984' >> /config/go2rtc.yaml &&
echo ' base: /go2rtc' >> /config/go2rtc.yaml &&
echo 'webrtc:' >> /config/go2rtc.yaml &&
echo ' listen: :8555' >> /config/go2rtc.yaml &&
echo 'rtsp:' >> /config/go2rtc.yaml &&
echo ' listen: :8554' >> /config/go2rtc.yaml &&
go2rtc
"
depends_on:
- backend