version: '3.8'

services:
  # Weaviate vector database
  weaviate:
    image: semitechnologies/weaviate:latest
    container_name: skill_seekers_test_weaviate
    ports:
      - "8080:8080"
    environment:
      AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: 'true'
      PERSISTENCE_DATA_PATH: '/var/lib/weaviate'
      QUERY_DEFAULTS_LIMIT: 20
      DEFAULT_VECTORIZER_MODULE: 'none'
      CLUSTER_HOSTNAME: 'node1'
    restart: on-failure:3
    healthcheck:
      test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8080/v1/.well-known/ready"]
      interval: 5s
      timeout: 3s
      retries: 10
      start_period: 10s

  # Qdrant vector database
  qdrant:
    image: qdrant/qdrant:latest
    container_name: skill_seekers_test_qdrant
    ports:
      - "6333:6333"
      - "6334:6334"
    environment:
      QDRANT__SERVICE__GRPC_PORT: 6334
    volumes:
      - qdrant_data:/qdrant/storage
    restart: on-failure:3
    healthcheck:
      test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:6333/"]
      interval: 5s
      timeout: 3s
      retries: 10
      start_period: 10s

  # ChromaDB vector database
  chroma:
    image: chromadb/chroma:latest
    container_name: skill_seekers_test_chroma
    ports:
      - "8000:8000"
    environment:
      IS_PERSISTENT: TRUE
      ANONYMIZED_TELEMETRY: FALSE
    volumes:
      - chroma_data:/chroma/chroma
    restart: on-failure:3
    healthcheck:
      test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8000/api/v1/heartbeat"]
      interval: 5s
      timeout: 3s
      retries: 10
      start_period: 10s

volumes:
  qdrant_data:
    driver: local
  chroma_data:
    driver: local
