mash-playbook icon indicating copy to clipboard operation
mash-playbook copied to clipboard

Add support for Frigate

Open cvwright opened this issue 1 year ago • 2 comments

This PR adds initial support for the Frigate network video recorder https://github.com/blakeblackshear/frigate

cvwright avatar Jul 08 '23 22:07 cvwright

Thanks for contributing support for Frigate!

Here's some feedback:

  • it'd be nice to add a documentation page
  • it'd be nice to expose it through Traefik like all other services. When done, frigate_container_http_host_bind_port should be unset. Traefik can also be used in local-only mode and without SSL certificates, so it shouldn't be preventing anyone from using Frigate in a local-only environment.
  • environment variables are defined inline in the systemd service file. It's better to use an env file which is passed via --env-file. See an example here. This has 4 benefits:
    • systemd will not need to be reloaded when the environment variables change (the playbook reloads it automatically anyway, so it's not that big of a deal)
    • any sensitive data in environment variables would not be visible from every user the machine doing ps aux
    • the systemd service file will be cleaner
    • adding a variable for extending the env file will be possible and easy
  • in tasks/install.yml, it's better to keep related actions close to one another. The file currently starts with creating a Docker network, then does a bunch of file-related stuff, then goes back to pulling Docker images. Most roles do all Docker-related operations at the bottom of the file.
  • defaults/main.yml mixes capitalization for booleans. It sometimes uses false, other times `False. It's better and more consisent with the rest of the playbook by using lowercase everywhere

spantaleev avatar Jul 09 '23 06:07 spantaleev

Thanks @spantaleev! It's great to get feedback from the expert.

The latest commits address most of your comments. The big to-do item that remains is to add support for Traefik.

cvwright avatar Jul 09 '23 17:07 cvwright