Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

1.3 KB
Raw Blame
# Dev harness for a DEDICATED pgvector database (MB_PGVECTOR_DB_URL). A dedicated database is not
# required: when MB_PGVECTOR_DB_URL is unset and the application database is Postgres with the pgvector
# extension available, semantic search automatically runs against the app db — its tables live in a
# dedicated `semantic_search` schema and share the app-db connection pool (so heavy reindexing competes
# with regular app-db traffic; use a dedicated database when that matters).
# Compose names a project after its directory. Pin the name so volumes created from the old `semantic_search`
# directory stay in use.
name: semantic_search
version: '3.8'

services:
  postgres:
    image: pgvector/pgvector:pg17
    environment:
      POSTGRES_DB: mb_semantic_search
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: postgres
    ports:
      - "127.0.0.1:55432:5432"
    volumes:
      - pgvector17_data:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U postgres"]
      interval: 5s
      timeout: 5s
      retries: 5

  ollama:
    image: ollama/ollama:latest
    ports:
      - "127.0.0.1:11434:11434"
    volumes:
      - ollama_data:/root/.ollama
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:11434/api/version"]
      interval: 30s
      timeout: 10s
      retries: 3

volumes:
  pgvector17_data:
  ollama_data: