# Local-only PostgreSQL + pgvector for the Electronics Catalog. # # Names are deliberately different from the grocery project's # (catalog_rag_postgres / catalog_rag_pgdata / port 5432) so the two can never # share a container, a volume or a port. Bound to 127.0.0.1: not reachable # from the network. # # docker compose up -d # # Ollama runs natively on Windows (http://localhost:11434), not in Docker. services: postgres: image: pgvector/pgvector:pg16 container_name: elec_catalog_pg restart: unless-stopped environment: POSTGRES_DB: electronics_catalog POSTGRES_USER: postgres POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?Set POSTGRES_PASSWORD in the root .env} # Small footprint for an 8 GB laptop that also runs Ollama and MiniLM. command: ["postgres", "-c", "shared_buffers=256MB", "-c", "work_mem=16MB", "-c", "max_connections=40"] ports: - "127.0.0.1:5433:5432" volumes: - elec_catalog_pgdata:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres -d electronics_catalog"] interval: 5s timeout: 5s retries: 20 volumes: elec_catalog_pgdata: