32 lines
1.1 KiB
YAML
32 lines
1.1 KiB
YAML
services:
|
|
frigate:
|
|
container_name: frigate2
|
|
image: ghcr.io/blakeblackshear/frigate:0.15.0-beta1
|
|
privileged: true # Required for accessing hardware, such as USB Coral TPU (if needed)
|
|
shm_size: '8g' # Increase shared memory for higher resolution streams
|
|
mem_swappiness: 0
|
|
memswap_limit: 16g
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 14g
|
|
cpus: '4.0' # Limit Frigate to use all 4 CPUs
|
|
reservations:
|
|
cpus: '4.0' # Reserve 4 CPUs for Frigate
|
|
restart: unless-stopped
|
|
volumes:
|
|
- /usr/docker/frigate/config:/config # Path for Frigate config
|
|
- /usr/docker/frigate/media:/media/frigate # Path for saving recordings
|
|
- /etc/localtime:/etc/localtime:ro # Sync host time with container
|
|
- type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear
|
|
target: /tmp/cache
|
|
tmpfs:
|
|
size: 8000000000
|
|
ports:
|
|
- "8972:8971"
|
|
- "8555:8554" # RTSP feeds
|
|
- "1985:1984"
|
|
- "5001:5000"
|
|
- "8556:8555/tcp" # WebRTC over tcp
|
|
- "8556:8555/udp" # WebRTC over udp
|