Added Healthcheck to Docker Compose

Frigate provides an HTTP server that can be used to detect if frigate is running or not. Using the docker-compose "healthcheck" feature we can set automations to restart the service if it stops working.
This commit is contained in:
Dejan Zelic 2020-09-28 13:18:45 -07:00 committed by Blake Blackshear
parent 8c45076bb6
commit 51251b9fb0

View File

@ -47,6 +47,12 @@ Example docker-compose:
- "5000:5000"
environment:
FRIGATE_RTSP_PASSWORD: "password"
healthcheck:
test: ["CMD", "wget" , "-q", "-O-", "http://localhost:5000"]
interval: 30s
timeout: 10s
retries: 5
start_period: 3m
```
A `config.yml` file must exist in the `config` directory. See example [here](config/config.example.yml) and device specific info can be found [here](docs/DEVICES.md).