Files
CamFinder/docker-compose.redis-rtsp.yml

71 lines
1.7 KiB
YAML

services:
redis:
image: redis:7-alpine
command: ["redis-server", "--appendonly", "yes", "--bind", "0.0.0.0", "--protected-mode", "no"]
volumes:
- camfinder-redis:/data
postgres:
image: postgres:16-alpine
environment:
POSTGRES_DB: camfinder
POSTGRES_USER: camfinder
POSTGRES_PASSWORD: camfinder
volumes:
- camfinder-postgres:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U camfinder -d camfinder"]
interval: 5s
timeout: 5s
retries: 10
start_period: 5s
coordinator:
build: .
command: ["redis-coordinator"]
environment:
REDIS_URL: redis://redis:6379/0
DATABASE_URL: postgres://camfinder:camfinder@postgres:5432/camfinder
RTSP_QUEUE_NAME: camfinder:rtsp:queue
RTSP_INPUT_CSV: /app/camfinder-open-rtsp.csv
RTSP_WORKER_COUNT: 2
depends_on:
redis:
condition: service_started
postgres:
condition: service_healthy
volumes:
- ./:/app
worker-1:
build: .
command: ["redis-worker"]
environment:
REDIS_URL: redis://redis:6379/0
RTSP_QUEUE_NAME: camfinder:rtsp:queue
RTSP_SNAPSHOT_DIR: /app/dump/feeds
RTSP_CAPTURE_TIMEOUT_MS: 15000
depends_on:
- redis
- coordinator
volumes:
- ./:/app
worker-2:
build: .
command: ["redis-worker"]
environment:
REDIS_URL: redis://redis:6379/0
RTSP_QUEUE_NAME: camfinder:rtsp:queue
RTSP_SNAPSHOT_DIR: /app/dump/feeds
RTSP_CAPTURE_TIMEOUT_MS: 15000
depends_on:
- redis
- coordinator
volumes:
- ./:/app
volumes:
camfinder-redis:
camfinder-postgres: