Expose frozen factual review policy, update API descriptions and Swagger settings, and adjust local deployment and embedding connectivity. Include the requested extraction candidates and review-policy regression coverage. Validation: 31 OCR policy tests passed; staged diff whitespace checks passed.
98 lines
3.1 KiB
YAML
98 lines
3.1 KiB
YAML
services:
|
|
db:
|
|
image: pgvector/pgvector:pg16
|
|
container_name: rag-postgres
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_DB: ${POSTGRES_DB:-rag}
|
|
POSTGRES_USER: ${POSTGRES_USER:-rag}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-rag_password}
|
|
ports:
|
|
- "${POSTGRES_PORT:-5432}:5432"
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-rag} -d ${POSTGRES_DB:-rag}"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 5s
|
|
|
|
migrations:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: rag-migrations
|
|
restart: "no"
|
|
command: alembic upgrade head
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
- INGEST_DATABASE_URL=postgresql+psycopg://${POSTGRES_USER:-rag}:${POSTGRES_PASSWORD:-rag_password}@db:5432/${POSTGRES_DB:-rag}
|
|
- INGEST_EMBEDDING_ENDPOINT=${INGEST_EMBEDDING_ENDPOINT:-http://localhost:11434/v1}
|
|
- INGEST_OCR_REVIEW_REQUIRED=${INGEST_OCR_REVIEW_REQUIRED:-true}
|
|
- INGEST_FACTUAL_REVIEW_REQUIRED=${INGEST_FACTUAL_REVIEW_REQUIRED:-true}
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
|
|
api:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: rag-api
|
|
restart: unless-stopped
|
|
command: python -m app.server --host 0.0.0.0 --port 8000
|
|
ports:
|
|
- "${API_PORT:-8080}:8000"
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
- INGEST_DATABASE_URL=postgresql+psycopg://${POSTGRES_USER:-rag}:${POSTGRES_PASSWORD:-rag_password}@db:5432/${POSTGRES_DB:-rag}
|
|
- INGEST_EMBEDDING_ENDPOINT=${INGEST_EMBEDDING_ENDPOINT:-http://localhost:11434/v1}
|
|
- INGEST_OCR_REVIEW_REQUIRED=${INGEST_OCR_REVIEW_REQUIRED:-true}
|
|
- INGEST_FACTUAL_REVIEW_REQUIRED=${INGEST_FACTUAL_REVIEW_REQUIRED:-true}
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
volumes:
|
|
- ./data/documents:/app/data/documents
|
|
- ./data/vector_db:/app/data/vector_db
|
|
- ./data/originals:/app/data/originals
|
|
- ./data/extractions:/app/data/extractions
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
migrations:
|
|
condition: service_completed_successfully
|
|
|
|
worker:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: rag-worker
|
|
restart: unless-stopped
|
|
stop_grace_period: 90s
|
|
command: python -m app.worker
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
- INGEST_DATABASE_URL=postgresql+psycopg://${POSTGRES_USER:-rag}:${POSTGRES_PASSWORD:-rag_password}@db:5432/${POSTGRES_DB:-rag}
|
|
- INGEST_EMBEDDING_ENDPOINT=${INGEST_EMBEDDING_ENDPOINT:-http://localhost:11434/v1}
|
|
- INGEST_OCR_REVIEW_REQUIRED=${INGEST_OCR_REVIEW_REQUIRED:-true}
|
|
- INGEST_FACTUAL_REVIEW_REQUIRED=${INGEST_FACTUAL_REVIEW_REQUIRED:-true}
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
volumes:
|
|
- ./data/originals:/app/data/originals
|
|
- ./data/extractions:/app/data/extractions
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
migrations:
|
|
condition: service_completed_successfully
|
|
|
|
volumes:
|
|
postgres_data:
|