2022-12-18 03:55:17 +00:00
|
|
|
version: '2.4'
|
|
|
|
networks:
|
|
|
|
all:
|
|
|
|
services:
|
|
|
|
bridge:
|
2023-10-22 15:24:11 +01:00
|
|
|
container_name: bridge-wyzely-detect
|
2022-12-18 03:55:17 +00:00
|
|
|
restart: unless-stopped
|
|
|
|
image: mrlt8/wyze-bridge:latest
|
2023-10-27 18:54:28 +01:00
|
|
|
# The ports can be removed since we're using the network
|
|
|
|
# Just an unnecesary security risk to expose them but can be useful for debugging
|
2023-10-15 04:31:48 +01:00
|
|
|
# ports:
|
|
|
|
# - 1935:1935 # RTMP
|
|
|
|
# - 8554:8554 # RTSP (this is really the only one we need)
|
|
|
|
# - 8888:8888 # HLS
|
|
|
|
# - 5000:5000 # WEB-UI
|
2022-12-18 03:55:17 +00:00
|
|
|
environment:
|
|
|
|
- WYZE_EMAIL=${WYZE_EMAIL} # Replace with wyze email
|
|
|
|
- WYZE_PASSWORD=${WYZE_PASSWORD} # Replace with wyze password
|
|
|
|
networks:
|
|
|
|
all:
|
|
|
|
ntfy:
|
|
|
|
image: binwiederhier/ntfy
|
2023-10-22 15:24:11 +01:00
|
|
|
container_name: ntfy-wyzely-detect
|
2022-12-18 03:55:17 +00:00
|
|
|
command:
|
|
|
|
- serve
|
|
|
|
environment:
|
|
|
|
- TZ=UTC # optional: set desired timezone
|
|
|
|
# volumes:
|
|
|
|
# - /var/cache/ntfy:/var/cache/ntfy
|
|
|
|
# - /etc/ntfy:/etc/ntfy
|
|
|
|
ports:
|
|
|
|
- 9216:80
|
|
|
|
restart: unless-stopped
|
|
|
|
networks:
|
|
|
|
all:
|
2023-10-22 15:24:11 +01:00
|
|
|
wyzely-detect:
|
|
|
|
container_name: wyzely-detect
|
2023-10-15 04:31:48 +01:00
|
|
|
restart: unless-stopped
|
2023-10-27 18:54:28 +01:00
|
|
|
image: ghcr.io/slashtechno/wyzely-detect:latest
|
|
|
|
# Building from source is also an option
|
|
|
|
# build:
|
|
|
|
# context: .
|
|
|
|
# dockerfile: Dockerfile
|
2022-12-18 03:55:17 +00:00
|
|
|
volumes:
|
2023-10-15 04:31:48 +01:00
|
|
|
- ./faces:/app/faces
|
2022-12-18 03:55:17 +00:00
|
|
|
networks:
|
|
|
|
all:
|
|
|
|
environment:
|
2023-10-15 04:31:48 +01:00
|
|
|
- URL=rtsp://bridge:8554/cv
|
|
|
|
- NO_DISPLAY=true
|
2023-10-22 15:24:11 +01:00
|
|
|
- NTFY_URL=http://ntfy:80/wyzely-detect
|
2022-12-18 03:55:17 +00:00
|
|
|
depends_on:
|
|
|
|
- bridge
|
2023-10-15 04:31:48 +01:00
|
|
|
|
2022-12-18 18:14:31 +00:00
|
|
|
# Use curl to check if the rtsp stream is up, then run the face recognition
|
2023-10-15 04:31:48 +01:00
|
|
|
# command: >
|
|
|
|
# /bin/sh -c "
|
|
|
|
# while true; do
|
|
|
|
# curl -s http://bridge:8888/cv/0.m3u8 > /dev/null
|
|
|
|
# if [ $? -eq 0 ]; then
|
|
|
|
# echo 'Stream is up, running face recognition'
|
|
|
|
# python3 /app/main.py
|
|
|
|
# else
|
|
|
|
# echo 'Stream is down, waiting 5 seconds'
|
|
|
|
# sleep 5
|
|
|
|
# fi
|
|
|
|
# done
|
|
|
|
# "
|
2022-12-18 18:19:21 +00:00
|
|
|
tty: true
|