Files
CamFinder/docker-compose.redis-rtsp_pro_max.yml
T
2026-06-30 22:23:09 -03:00

149 lines
3.5 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
ports:
- "6379:6379"
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: 8
depends_on:
redis:
condition: service_started
postgres:
condition: service_healthy
volumes:
- ./:/app:ro
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:
- ./dump:/app/dump
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:
- worker-1
volumes:
- ./dump:/app/dump
worker-3:
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:
- worker-2
volumes:
- ./dump:/app/dump
worker-4:
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:
- worker-3
volumes:
- ./dump:/app/dump
worker-5:
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:
- worker-4
volumes:
- ./dump:/app/dump
worker-6:
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:
- worker-5
volumes:
- ./dump:/app/dump
worker-7:
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:
- worker-6
volumes:
- ./dump:/app/dump
worker-8:
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:
- worker-7
volumes:
- ./dump:/app/dump
volumes:
camfinder-redis:
camfinder-postgres: