Skip to content

Commit

Permalink
⬆️ Update Frigate
Browse files Browse the repository at this point in the history
  • Loading branch information
anarion80 committed Aug 26, 2024
1 parent 48bb369 commit 359b369
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 509 deletions.
1 change: 1 addition & 0 deletions roles/frigate/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ frigate_group_id: "1000"
frigate_rtsp_password: "password"
frigate_camera_username: "username"
frigate_camera_password: "password"
frigate_yolo_models: "yolov7-320"
frigate_mqtt_host: "{{ ansible_nas_hostname }}"
frigate_mqtt_port: "{{ mosquitto_port_a }}"
frigate_mqtt_topic_prefix: "frigate"
Expand Down
16 changes: 12 additions & 4 deletions roles/frigate/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,29 @@
dest: "{{ frigate_data_directory }}/config/config.yml"
owner: "{{ frigate_user_id }}"
group: "{{ frigate_group_id }}"
tags: molecule-idempotence-notest

- name: Create Frigate Docker Container
community.docker.docker_container:
name: "{{ frigate_container_name }}"
image: "{{ frigate_docker_image }}:{{ frigate_docker_image_version }}"
pull: true
tty: true
groups:
- "109" # render
- "110" # render
- "44" # video
- "46" # plugdev
volumes:
- /var/run/docker.sock:/var/run/docker.sock
# - /dev/bus/usb:/dev/bus/usb
- /etc/localtime:/etc/localtime:ro
- "{{ frigate_data_directory }}/config:/config"
- "{{ frigate_data_directory }}/media:/media/frigate"
- type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear
target: /tmp/cache
tmpfs:
size: 1000000000
# - type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear
# target: /tmp/cache
# tmpfs:
# size: 1000000000
ports:
- "{{ frigate_port }}:5000"
- "{{ frigate_rtmp_port }}:1935" # RTMP feeds
Expand All @@ -44,6 +51,7 @@
PUID: "{{ frigate_user_id }}"
PGID: "{{ frigate_group_id }}"
FRIGATE_RTSP_PASSWORD: "{{ frigate_rtsp_password }}"
YOLO_MODELS: "{{ frigate_yolo_models }}"
restart_policy: unless-stopped
memory: "{{ frigate_memory }}"
shm_size: "340M"
Expand Down
Loading

0 comments on commit 359b369

Please sign in to comment.