Regalamiunsorriso/faceai/docker-compose.yml
MaddoScientisto a95ae56134
All checks were successful
Publish FaceAI Container / publish (push) Successful in 13m8s
feat(monitor-frontend): add FaceAI Audit Monitor application with Vue.js and Vite setup
- Created App.vue for the main application interface with localization support.
- Added main.js to bootstrap the Vue application.
- Introduced styles.css for application styling.
- Configured Vite for development and proxying API requests.
- Updated docker-compose files to include the new monitor service.
- Added Dockerfile for building the monitor frontend.
- Configured Nginx for serving the frontend and proxying API requests.
- Updated package.json and package-lock.json to include monitor-frontend workspace.
- Added initial SQLite database for audit monitoring.
2026-05-20 18:57:20 +02:00

104 lines
4.8 KiB
YAML

services:
faceai:
image: ${FACEAI_CLIENT_IMAGE:-forgejo.maddoscientisto.net/maddo/faceai-client:latest}
container_name: ${FACEAI_CLIENT_CONTAINER_NAME:-regalami-faceai}
restart: unless-stopped
command:
- node
- docker/run-with-log-file.mjs
- ${FACEAI_BACKEND_LOG_FILE:-/data/logs/backend.log}
- npm
- run
- start
environment:
NODE_ENV: ${NODE_ENV:-production}
PORT: ${FACEAI_PORT:-3001}
FACEAI_FRONTEND_URL: ${FACEAI_FRONTEND_URL:-https://ai.regalamiunsorriso.it}
FACEAI_PUBLIC_BASE_URL: ${FACEAI_PUBLIC_BASE_URL:-https://ai.regalamiunsorriso.it}
FACEAI_LEGACY_RETURN_URL: ${FACEAI_LEGACY_RETURN_URL:-https://www.regalamiunsorriso.it/faceai_return.php}
FACEAI_LEGACY_HOME_URL: ${FACEAI_LEGACY_HOME_URL:-https://www.regalamiunsorriso.it}
FACEAI_SHARED_SECRET: ${FACEAI_SHARED_SECRET:-change-me}
FACEAI_SESSION_COOKIE: ${FACEAI_SESSION_COOKIE:-rus_faceai_session}
FACEAI_REDIS_URL: ${FACEAI_REDIS_URL:-redis://redis:6379}
FACEAI_QUEUE_NAME: ${FACEAI_QUEUE_NAME:-faceai-searches}
FACEAI_RUNTIME_ROOT: ${FACEAI_RUNTIME_ROOT:-/data/runtime}
FACEAI_UPLOAD_ROOT: ${FACEAI_UPLOAD_ROOT:-/data/runtime/uploads}
FACEAI_LOG_ROOT: ${FACEAI_LOG_ROOT:-/data/logs}
FACEAI_AUDIT_DB_PATH: ${FACEAI_AUDIT_DB_PATH:-/data/logs/faceai-audit.sqlite}
FACEAI_AUDIT_RETENTION_DAYS: ${FACEAI_AUDIT_RETENTION_DAYS:-730}
FACEAI_PKL_ROOT: ${FACEAI_PKL_ROOT:-/data/pkl}
FACEAI_ENABLE_LOCAL_LEGACY_STATIC: ${FACEAI_ENABLE_LOCAL_LEGACY_STATIC:-0}
volumes:
- ${FACEAI_RUNTIME_BIND:-/mnt/storage/data/faceai/runtime}:${FACEAI_RUNTIME_ROOT:-/data/runtime}
- ${FACEAI_LOG_BIND:-/mnt/storage/data/faceai/logs}:${FACEAI_LOG_ROOT:-/data/logs}
- ${FACEAI_PKL_BIND:-/mnt/nas12/nas2/RUS}:${FACEAI_PKL_ROOT:-/data/pkl}:ro
ports:
- "${FACEAI_PUBLISHED_PORT:-3001}:${FACEAI_PORT:-3001}"
healthcheck:
test: ["CMD", "node", "-e", "fetch('http://127.0.0.1:' + (process.env.PORT || '3001') + '/health').then(async (response) => { const payload = await response.json().catch(() => ({})); if (!response.ok || payload.ok !== true) { console.error(JSON.stringify(payload)); process.exit(1); } }).catch((error) => { console.error(error.stack || error.message); process.exit(1); })"]
interval: 10s
timeout: 5s
retries: 6
start_period: 20s
depends_on:
redis:
condition: service_healthy
faceai-monitor:
image: ${FACEAI_MONITOR_IMAGE:-forgejo.maddoscientisto.net/maddo/faceai-monitor:latest}
container_name: ${FACEAI_MONITOR_CONTAINER_NAME:-regalami-faceai-monitor}
restart: unless-stopped
ports:
- "${FACEAI_MONITOR_PUBLISHED_PORT:-127.0.0.1:3002:80}"
healthcheck:
test: ["CMD-SHELL", "wget -q -O - http://127.0.0.1/healthz >/dev/null 2>&1 || exit 1"]
interval: 15s
timeout: 5s
retries: 6
start_period: 10s
depends_on:
faceai:
condition: service_healthy
processor:
image: ${FACEAI_PROCESSOR_IMAGE:-forgejo.maddoscientisto.net/maddo/faceai-processor:latest}
container_name: ${FACEAI_PROCESSOR_CONTAINER_NAME:-regalami-faceai-processor}
restart: unless-stopped
command:
- node
- docker/run-with-log-file.mjs
- ${FACEAI_PROCESSOR_LOG_FILE:-/data/logs/processor.log}
- npm
- run
- start:processor
environment:
NODE_ENV: ${NODE_ENV:-production}
FACEAI_REDIS_URL: ${FACEAI_REDIS_URL:-redis://redis:6379}
FACEAI_QUEUE_NAME: ${FACEAI_QUEUE_NAME:-faceai-searches}
FACEAI_RUNTIME_ROOT: ${FACEAI_RUNTIME_ROOT:-/data/runtime}
FACEAI_LOG_ROOT: ${FACEAI_LOG_ROOT:-/data/logs}
FACEAI_AUDIT_DB_PATH: ${FACEAI_AUDIT_DB_PATH:-/data/logs/faceai-audit.sqlite}
FACEAI_AUDIT_RETENTION_DAYS: ${FACEAI_AUDIT_RETENTION_DAYS:-730}
FACEAI_PKL_ROOT: ${FACEAI_PKL_ROOT:-/data/pkl}
FACEAI_MATCHER_BINARY: ${FACEAI_MATCHER_BINARY:-/app/bin/face_matcher}
FACEAI_MATCHER_TOLERANCE: ${FACEAI_MATCHER_TOLERANCE:-0.5}
FACEAI_WORKER_CONCURRENCY: ${FACEAI_WORKER_CONCURRENCY:-8}
FACEAI_WORKER_TIMEOUT_MS: ${FACEAI_WORKER_TIMEOUT_MS:-300000}
volumes:
- ${FACEAI_RUNTIME_BIND:-/mnt/storage/data/faceai/runtime}:${FACEAI_RUNTIME_ROOT:-/data/runtime}
- ${FACEAI_LOG_BIND:-/mnt/storage/data/faceai/logs}:${FACEAI_LOG_ROOT:-/data/logs}
- ${FACEAI_PKL_BIND:-/mnt/nas12/nas2/RUS}:${FACEAI_PKL_ROOT:-/data/pkl}:ro
depends_on:
redis:
condition: service_healthy
redis:
image: ${FACEAI_REDIS_IMAGE:-redis:7-alpine}
container_name: ${FACEAI_REDIS_CONTAINER_NAME:-regalami-faceai-redis}
restart: unless-stopped
command: ${FACEAI_REDIS_COMMAND:-redis-server --appendonly no}
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 12