/
/
/
1services:
2 frigate:
3 container_name: frigate
4{% if frigate_hardware_acceleration == 'nvenc' %}
5 image: ghcr.io/blakeblackshear/frigate:stable-tensorrt
6{% else %}
7 image: ghcr.io/blakeblackshear/frigate:stable
8{% endif %}
9 restart: unless-stopped
10 privileged: true
11
12 shm_size: "1gb"
13 env_file:
14 - frigate.env
15
16 volumes:
17 # Configuration (read-write for dynamic config updates)
18 - {{ frigate_config_dir }}/config:/config
19
20 # Local storage for database and models
21 - {{ frigate_config_dir }}/data:/data
22
23 # NFS storage for recordings
24 - {{ frigate_data_dir }}:/media/frigate
25
26 # Temporary memory storage for clips
27 - type: tmpfs
28 target: /tmp/cache
29 tmpfs:
30 size: 1000000000 # 1GB
31
32 ports:
33 - "{{ frigate_port }}:5000" # Web UI
34 - "{{ frigate_rtmp_port }}:1935" # RTMP
35 - "{{ frigate_rtsp_port }}:8554" # RTSP Re-stream
36
37{% if frigate_hardware_acceleration == 'nvenc' %}
38 runtime: nvidia
39 environment:
40 - NVIDIA_VISIBLE_DEVICES=all
41 - NVIDIA_DRIVER_CAPABILITIES=all
42
43 devices:
44 - /dev/dri:/dev/dri
45{% endif %}
46
47 deploy:
48 resources:
49 limits:
50 memory: {{ frigate_memory_limit }}
51 cpus: '{{ frigate_cpu_limit }}'