My appologies. I just checked my configuration and I found I chose different strategy. Let me describe how it works.
- I’ve mounted USB drive to
/mnt/data_4TB
usingfstab
. - Frigate is configured to save directly to the USB drive by volume type
bind
to/mnt/data_4TB/Frigate
. - Frigate configuration is stored in Home Assistant
shared/Frigate
folder so it’s backuped by the HA backups:/usr/share/hassio/share/Frigate/config.yml
. This location is mapped to the Frigate as volume from host Debian using againbind
type volume withreadonly
parameter. - In Home Assistant I have installed
Frigate NVR Proxy
which is allowing to view the recordings and clips using theMedia Browser
in HA.
So I’m not using the soft links. I’m using bind
type volume.
This is my Docker compose which I have in Portainer in Stacks:
version: "3.9"
services:
frigate:
container_name: frigate
privileged: true # this may not be necessary for all setups
restart: unless-stopped
image: blakeblackshear/frigate:0.9.0-rc5-amd64
shm_size: "256mb" # update for your cameras using formula: (width * height * 1.5 * 9 + 270480)/1048576 * N cameras
devices:
- /dev/bus/usb:/dev/bus/usb
- /dev/dri/renderD128 # for intel hwaccel, needs to be updated for your hardware
volumes:
- /etc/localtime:/etc/localtime:ro
- source: /usr/share/hassio/share/Frigate
target: /config
type: bind
read_only: true
- source: /mnt/data_4TB/Frigate
target: /media/frigate
type: bind
read_only: false
- type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear
target: /tmp/cache
tmpfs:
size: 1000000000
ports:
- "5000:5000"
- "1935:1935" # RTMP feeds
Hope this helps