Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
59 lines (51 loc) · 2.07 KB
/
Copy pathdocker-compose.yml
File metadata and controls
59 lines (51 loc) · 2.07 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
services:
uhf-server:
image: solidpixel/uhf-server:uhf-2.2.1-ffmpeg7.1.5-d1
container_name: uhf-server
restart: unless-stopped
volumes:
# Persist recordings and database
- ./uhf-data:/var/lib/uhf-server
# OPTIONAL: store recordings in a different location
# Uncomment the line below IN ADDITION to the one above
# This overrides only /recordings inside the container
# - ./uhf-recordings:/var/lib/uhf-server/recordings
ports:
- 8000:8000 # <HOST>:<CONTAINER>
# Optional container environment config
environment:
- ENABLE_COMMERCIAL_DETECTION=${ENABLE_COMMERCIAL_DETECTION:-false} # set true for commercial detection
- SINGLE_FILE_RECORDINGS=${SINGLE_FILE_RECORDINGS:-false} # set true to merge finished recordings
- PASSWORD=${PASSWORD:-}
# Uncomment below to customize internal container settings (usually not needed)
# - API_HOST=0.0.0.0
# - API_PORT=8000
# - RECORDINGS_DIR=/var/lib/uhf-server/recordings
# - DB_PATH=/var/lib/uhf-server/db.json
# - LOG_LEVEL=INFO # Options: DEBUG, INFO, WARNING, ERROR, CRITICAL
# Command with conditional flags
# !!! Do not modify this unless you know what you're doing !!!
command:
- bash
- -c
- |
commercial_detection="$${ENABLE_COMMERCIAL_DETECTION:-}"
single_file_recordings="$${SINGLE_FILE_RECORDINGS:-}"
password="$${PASSWORD:-}"
unset ENABLE_COMMERCIAL_DETECTION SINGLE_FILE_RECORDINGS PASSWORD
args=(uhf-server)
if [[ "$$commercial_detection" == "true" ]]; then
args+=(--enable-commercial-detection)
fi
if [[ "$$single_file_recordings" == "true" ]]; then
args+=(--single-file-recordings)
fi
if [[ -n "$$password" ]]; then
args+=(--password "$$password")
fi
exec "$${args[@]}"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/server/stats"] # update URL if API_PORT changes
interval: 30s
timeout: 5s
retries: 3