-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
47 lines (44 loc) · 1.37 KB
/
Copy pathdocker-compose.yml
File metadata and controls
47 lines (44 loc) · 1.37 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
version: "3.8"
services:
# ── RTSP 流管理 ──
go2rtc:
image: alexxit/go2rtc:latest
container_name: timecut-go2rtc
restart: unless-stopped
# host 网络:小米摄像头 P2P 需要能直连 go2rtc 的 IP,
# 容器 bridge 内网 IP(如 172.20.x.x)局域网摄像头无法访问,会导致连接超时
network_mode: host
volumes:
- ./go2rtc.yaml:/config/go2rtc.yaml
- ./storage/go2rtc:/config
# ── 核心应用(录像 + 精华检测 + Web UI)──
# 使用 GitHub Actions 自动构建的预编译镜像,NAS 无需编译,直接拉取
app:
image: ghcr.io/foodpm/timecut:latest
# 如需自行构建,取消下面注释并注释上面一行:
# build:
# context: .
# dockerfile: Dockerfile
container_name: timecut-app
restart: unless-stopped
ports:
- "${WEB_PORT:-8090}:8090"
volumes:
- ./storage:/data
# go2rtc 自愈:RTSP 持续 404 时通过 Docker API 自动重启 go2rtc 容器
- ${DOCKER_SOCK:-/var/run/docker.sock}:/var/run/docker.sock
environment:
- TZ=Asia/Shanghai
- DATA_DIR=/data
- GO2RTC_URL=http://host.docker.internal:1984
extra_hosts:
- "host.docker.internal:host-gateway"
env_file:
- .env
depends_on:
- go2rtc
networks:
- timecut-net
networks:
timecut-net:
driver: bridge