Introduce an admin portal (React + Nginx), WebSocket routing, and API versioning middleware with `/api/v1/` prefix deprecation. Add master API key authentication, new Prometheus metrics for AI token consumption and active WebSockets, and extend S3 config with a public endpoint URL. Update test paths and fixtures to align with the new routing structure.
105 lines
2.2 KiB
YAML
105 lines
2.2 KiB
YAML
services:
|
|
# Portail admin (ce projet)
|
|
admin:
|
|
build:
|
|
context: .
|
|
args:
|
|
VITE_API_BASE_URL: http://backend:8000
|
|
ports:
|
|
- "3000:3000"
|
|
depends_on:
|
|
- backend
|
|
restart: unless-stopped
|
|
|
|
# Backend Imago Hub (projet séparé)
|
|
backend:
|
|
build:
|
|
context: ..
|
|
ports:
|
|
- "8000:8000"
|
|
volumes:
|
|
- ../data:/app/data
|
|
env_file: ../.env
|
|
environment:
|
|
- DATABASE_URL=postgresql+asyncpg://imago:imago@db:5432/imago
|
|
- REDIS_URL=redis://redis:6379/0
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
|
|
# Worker ARQ
|
|
worker:
|
|
build:
|
|
context: ..
|
|
command: python worker.py
|
|
volumes:
|
|
- ../data:/app/data
|
|
env_file: ../.env
|
|
environment:
|
|
- DATABASE_URL=postgresql+asyncpg://imago:imago@db:5432/imago
|
|
- REDIS_URL=redis://redis:6379/0
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
|
|
# PostgreSQL
|
|
db:
|
|
image: postgres:16-alpine
|
|
environment:
|
|
POSTGRES_USER: imago
|
|
POSTGRES_PASSWORD: imago
|
|
POSTGRES_DB: imago
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U imago -d imago"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
restart: unless-stopped
|
|
|
|
# Redis (file ARQ + Pub/Sub)
|
|
redis:
|
|
image: redis:7-alpine
|
|
ports:
|
|
- "6379:6379"
|
|
volumes:
|
|
- redis_data:/data
|
|
command: redis-server --appendonly yes
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 3
|
|
|
|
# MinIO (stockage S3 compatible — développement)
|
|
minio:
|
|
image: minio/minio
|
|
ports:
|
|
- "9000:9000"
|
|
- "9001:9001"
|
|
environment:
|
|
MINIO_ROOT_USER: minioadmin
|
|
MINIO_ROOT_PASSWORD: minioadmin
|
|
command: server /data --console-address ":9001"
|
|
volumes:
|
|
- minio_data:/data
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
postgres_data:
|
|
redis_data:
|
|
minio_data:
|