Initial containerized Frigate camera control bridge
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
# Podman Quadlet Example
|
||||
|
||||
## PL
|
||||
|
||||
To jest generyczny przyklad uruchomienia kontenera
|
||||
`frigate-camera-control-bridge` przez Podman Quadlet. Pliki sa przykladem dla
|
||||
jednej instancji Frigate. Dla wielu instancji skopiuj `.container` oraz `.env`
|
||||
i zmien `FRIGATE_NAME`, `FRIGATE_URL`, `BASE_TOPIC`, port publikowany przez
|
||||
`PublishPort` oraz credentiale MQTT.
|
||||
|
||||
Przykladowa instalacja:
|
||||
|
||||
```bash
|
||||
install -d /etc/frigate-camera-control-bridge
|
||||
install -m 0600 frigate-camera-control-bridge.env.example \
|
||||
/etc/frigate-camera-control-bridge/frigate-main.env
|
||||
install -m 0644 frigate-camera-control-bridge.container \
|
||||
/etc/containers/systemd/frigate-camera-control-bridge.container
|
||||
systemctl daemon-reload
|
||||
systemctl enable --now frigate-camera-control-bridge.service
|
||||
```
|
||||
|
||||
W pliku env uzupelnij:
|
||||
- `MQTT_HOST`, `MQTT_USER`, `MQTT_PASSWORD`
|
||||
- `DEFAULT_CAMERA_USER`, `DEFAULT_CAMERA_PASSWORD`
|
||||
- `FRIGATE_NAME`, `FRIGATE_URL`, `BASE_TOPIC`
|
||||
|
||||
Jesli sidecar ma startowac razem z istniejaca usluga Frigate, dopasuj w
|
||||
`.container` nazwe `frigate.service` w polach `After`, `Requires`, `BindsTo`
|
||||
i `PartOf`.
|
||||
|
||||
## EN
|
||||
|
||||
This is a generic example for running `frigate-camera-control-bridge` with
|
||||
Podman Quadlet. The files model one Frigate instance. For multiple instances,
|
||||
copy the `.container` and `.env` files and change `FRIGATE_NAME`,
|
||||
`FRIGATE_URL`, `BASE_TOPIC`, the `PublishPort` binding, and MQTT credentials.
|
||||
|
||||
Example install:
|
||||
|
||||
```bash
|
||||
install -d /etc/frigate-camera-control-bridge
|
||||
install -m 0600 frigate-camera-control-bridge.env.example \
|
||||
/etc/frigate-camera-control-bridge/frigate-main.env
|
||||
install -m 0644 frigate-camera-control-bridge.container \
|
||||
/etc/containers/systemd/frigate-camera-control-bridge.container
|
||||
systemctl daemon-reload
|
||||
systemctl enable --now frigate-camera-control-bridge.service
|
||||
```
|
||||
|
||||
Fill these env values:
|
||||
- `MQTT_HOST`, `MQTT_USER`, `MQTT_PASSWORD`
|
||||
- `DEFAULT_CAMERA_USER`, `DEFAULT_CAMERA_PASSWORD`
|
||||
- `FRIGATE_NAME`, `FRIGATE_URL`, `BASE_TOPIC`
|
||||
|
||||
If the sidecar should follow an existing Frigate service, adjust the
|
||||
`frigate.service` references in `After`, `Requires`, `BindsTo`, and `PartOf`.
|
||||
@@ -0,0 +1,25 @@
|
||||
[Unit]
|
||||
Description=Frigate camera control bridge sidecar
|
||||
Wants=network-online.target
|
||||
After=network-online.target frigate.service
|
||||
Requires=frigate.service
|
||||
BindsTo=frigate.service
|
||||
PartOf=frigate.service
|
||||
RequiresMountsFor=/var/lib/frigate-camera-control-bridge
|
||||
|
||||
[Container]
|
||||
ContainerName=frigate-camera-control-bridge
|
||||
Image=localhost/frigate-camera-control-bridge:1.0
|
||||
PublishPort=0.0.0.0:5011:5011
|
||||
Volume=/var/lib/frigate-camera-control-bridge:/var/lib/frigate-camera-control-bridge
|
||||
Volume=/etc/localtime:/etc/localtime:ro
|
||||
PodmanArgs=--env-file=/etc/frigate-camera-control-bridge/frigate-main.env
|
||||
|
||||
[Service]
|
||||
Restart=on-failure
|
||||
RestartSec=5s
|
||||
TimeoutStartSec=180
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
WantedBy=frigate.service
|
||||
@@ -0,0 +1,24 @@
|
||||
FRIGATE_NAME=frigate-main
|
||||
FRIGATE_URL=http://127.0.0.1:5000
|
||||
BASE_TOPIC=frigate_camera_control/frigate-main
|
||||
|
||||
MQTT_HOST=mqtt.local
|
||||
MQTT_PORT=1883
|
||||
MQTT_USER=change-me
|
||||
MQTT_PASSWORD=change-me
|
||||
|
||||
DEFAULT_CAMERA_USER=admin
|
||||
DEFAULT_CAMERA_PASSWORD=change-me
|
||||
|
||||
HTTP_PORT=5011
|
||||
UI_LANGUAGE=en
|
||||
WAIT_FOR_FRIGATE=true
|
||||
FRIGATE_RETRY_SECONDS=5
|
||||
FRIGATE_STARTUP_WAIT_SECONDS=0
|
||||
|
||||
SNAPSHOT_ENABLED=true
|
||||
SNAPSHOT_HEIGHT=180
|
||||
SNAPSHOT_CACHE_SECONDS=300
|
||||
SNAPSHOT_RETRY_SECONDS=600
|
||||
SNAPSHOT_REFRESH_SECONDS=3600
|
||||
SNAPSHOT_LIVE_ON_GUI=true
|
||||
Reference in New Issue
Block a user