Commit Graph

5 Commits (7c6ed667be1b734fe1192291185d2675c39005e3)

Author SHA1 Message Date
Dustin 2ca92f68f7 r/frigate: Restart service if it fails
Sometimes, Frigate crashes in situations that should be recoverable or
temporary.  For example, it will fail to start if the MQTT server is
unreachable initially, and does not attempt to connect more than once.
To avoid having to manually restart the service once the MQTT server is
ready, we can configure the systemd unit to enable automatic restarts.
2022-08-22 20:08:09 -05:00
Dustin 0de1f84905 r/frigate: Wait for network before starting service
Frigate needs to be able to connect to the MQTT immediately upon start
up or it will crash.  Ordering the *frigate.service* unit after
*network-online.target* will help ensure Frigate starts when the system
boots.
2022-08-12 16:24:28 -05:00
Dustin eb79f6ea83 r/frigate: Work around podman/netavark lock
Podman 4 puts lock files in the configuration directory for [some stupid
reason][0].  There are so many issues here!

* It is now impossible to run `podman` as root with a read-only `/etc`.
* Why does it need the lock file at all when using `--network=host`?

Luckily, we can work around it fairly easily by mounting a tmpfs
filesystem over the directory it wants to put the lock file in.  This
pretty much defeats the purpose of having a lock file, but it's likely
not needed anyway.

[0]: 836fa4c493
2022-07-23 17:43:54 -05:00
Dustin d8bb629c5d r/frigate: Ensure service starts at boot
Missing a task to enable the *frigate.service* unit meant that the
service would not start automatically when the machine booted.
2021-12-30 09:35:14 -06:00
Dustin 997760968e r/frigate: Add role to deploy Frigate
Frigate is an NVR that uses machine learning to detect objects on camera
in real time.  It integrates with Home Assistant to expose sensors which
can be used for automation, etc.

The only official way to deploy Frigate is with a container, so we use
Podman and systemd to manage it.
2021-08-21 17:16:58 -05:00