version: "3.9" services: db: image: pgvector/pgvector:pg16 environment: POSTGRES_DB: complyai POSTGRES_USER: complyai POSTGRES_PASSWORD: complyai_secret_2026 ports: - "5432:5432" volumes: - postgres_data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U complyai"] interval: 5s timeout: 5s retries: 5 redis: image: redis:7-alpine ports: - "6379:6379" healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 5s timeout: 5s retries: 5 api: build: context: ./backend dockerfile: Dockerfile ports: - "8000:8000" environment: DATABASE_URL: postgresql+asyncpg://complyai:complyai_secret_2026@db:5432/complyai REDIS_URL: redis://redis:6379/0 SECRET_KEY: complyai-dev-secret-key-change-in-production ENVIRONMENT: development CORS_ORIGINS: http://localhost:3000,http://localhost:5173 depends_on: db: condition: service_healthy redis: condition: service_healthy volumes: - ./backend:/app - uploads:/app/uploads command: uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload worker: build: context: ./backend dockerfile: Dockerfile environment: DATABASE_URL: postgresql+asyncpg://complyai:complyai_secret_2026@db:5432/complyai REDIS_URL: redis://redis:6379/0 SECRET_KEY: complyai-dev-secret-key-change-in-production ENVIRONMENT: development depends_on: db: condition: service_healthy redis: condition: service_healthy volumes: - ./backend:/app - uploads:/app/uploads command: celery -A app.tasks worker --loglevel=info --concurrency=2 frontend: build: context: ./frontend dockerfile: Dockerfile ports: - "3000:3000" environment: VITE_API_URL: http://localhost:8000/api/v1 depends_on: - api volumes: - ./frontend:/app - /app/node_modules volumes: postgres_data: uploads: