Regalamiunsorriso/faceai/docker-compose.yml
MaddoScientisto bbb9c193ce feat: add processor service with Redis-backed job queue
- Introduced a new `processor` service in the Docker Compose setup to handle face matching jobs.
- Configured Redis as a job queue and state management system for processing searches.
- Updated the backend to enqueue jobs and manage user locks using Redis.
- Added environment variables for Redis configuration and runtime paths.
- Created technical design documentation for the processor service outlining architecture, queue model, and search lifecycle.
- Updated package.json and package-lock.json to include dependencies for BullMQ and ioredis in the processor workspace.
- Added sample PKL files for local testing in the `test_pkl` directory.
2026-04-11 17:53:22 +02:00

69 lines
2 KiB
YAML

services:
faceai:
image: node:20-alpine
container_name: regalami-faceai
working_dir: /app
command: sh -c "npm run start --workspace @regalami/faceai-backend"
environment:
PORT: 3001
FACEAI_FRONTEND_URL: http://localhost:3001
FACEAI_PUBLIC_BASE_URL: http://localhost:3001
FACEAI_LEGACY_RETURN_URL: http://localhost:8080/faceai_return.php
FACEAI_ENABLE_LOCAL_LEGACY_STATIC: 1
FACEAI_LOCAL_LEGACY_STATIC_ROOT: /legacy-www
FACEAI_SHARED_SECRET: change-me
FACEAI_SESSION_COOKIE: rus_faceai_session
FACEAI_REDIS_URL: redis://redis:6379
FACEAI_RUNTIME_ROOT: /data/runtime
FACEAI_UPLOAD_ROOT: /data/runtime/uploads
volumes:
- .:/app
- ../www:/legacy-www:ro
- faceai-runtime:/data/runtime
ports:
- "3001:3001"
depends_on:
- redis
processor:
image: node:20-bookworm-slim
container_name: regalami-faceai-processor
working_dir: /app
command: sh -c "npm run start --workspace @regalami/faceai-processor"
environment:
FACEAI_REDIS_URL: redis://redis:6379
FACEAI_QUEUE_NAME: faceai-searches
FACEAI_RUNTIME_ROOT: /data/runtime
FACEAI_PKL_ROOT: /data/pkl
FACEAI_TEST_PKL_ROOT: /data/pkl/test
FACEAI_WORKER_CONCURRENCY: 2
FACEAI_MATCHER_BINARY: /opt/face-recognition/face_matcher
volumes:
- .:/app
- ../bin/Face_Recognition_Unix:/opt/face-recognition:ro
- ../test_pkl:/data/pkl/test:ro
- faceai-runtime:/data/runtime
depends_on:
- redis
redis:
image: redis:7-alpine
container_name: regalami-faceai-redis
command: redis-server --appendonly no
legacy-php:
image: php:8.3-apache
container_name: regalami-legacy-php
environment:
FACEAI_BACKEND_INTERNAL_URL: http://faceai:3001
FACEAI_FRONTEND_URL: http://localhost:3001
FACEAI_SHARED_SECRET: change-me
FACEAI_ALLOW_DEV_HANDOFF: 1
FACEAI_IDENTITY_COOKIE: rus_faceai_identity
volumes:
- ../www:/var/www/html
ports:
- "8080:80"
volumes:
faceai-runtime: