ITARS_Ver-2.0 / docker-compose.yml
Eklavya Singh Rathore
feat(rag): replace Qdrant with Supabase pgvector (Phase 15B)
7cf9ba4
Raw
History Blame Contribute Delete
1.82 kB
# Full-stack self-host topology for ITARS V2: backend + Postgres (pgvector).
# ITARS_MODELS_PATH=/abs/path/to/hf_deploy/Models \
# ITARS_DATA_PATH=/abs/path/to/hf_deploy/Data \
# GEMINI_API_KEY=... \
# docker compose up --build
#
# Mirrors the production target: a single Postgres (pgvector image) is BOTH the
# relational decision log AND the RAG vector store. The model artifacts live
# outside the repository (typically the legacy hf_deploy/ bundle) and are mounted
# read-only via ITARS_MODELS_PATH / ITARS_DATA_PATH.
services:
backend:
build:
context: .
ports:
- "8000:8000"
environment:
ITARS_DATABASE_URL: postgresql+psycopg://itars:itars@postgres:5432/itars
# Vector store auto-selects pgvector because the DB is Postgres.
ITARS_VECTOR_STORE: ${ITARS_VECTOR_STORE:-auto}
ITARS_LLM_PROVIDER: ${ITARS_LLM_PROVIDER:-gemini}
GEMINI_API_KEY: ${GEMINI_API_KEY:-}
ITARS_GEMINI_MODEL: ${ITARS_GEMINI_MODEL:-gemini-2.5-flash}
ITARS_CORS_ORIGINS: ${ITARS_CORS_ORIGINS:-*}
ITARS_API_TOKEN: ${ITARS_API_TOKEN:-}
volumes:
- ${ITARS_MODELS_PATH:?set ITARS_MODELS_PATH to your Models directory}:/models:ro
- ${ITARS_DATA_PATH:?set ITARS_DATA_PATH to your Data directory}:/data:ro
- hf_cache:/cache/hf
depends_on:
postgres:
condition: service_healthy
postgres:
# pgvector-enabled Postgres image (relational + vector in one).
image: pgvector/pgvector:pg16
environment:
POSTGRES_USER: itars
POSTGRES_PASSWORD: itars
POSTGRES_DB: itars
ports:
- "5432:5432"
volumes:
- pg_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U itars"]
interval: 5s
timeout: 3s
retries: 10
volumes:
hf_cache:
pg_data: