version: "3.8" services: # Ollama Service for embeddings ollama: image: ollama/ollama:latest container_name: ollama ports: - "11434:11434" volumes: - ollama-data:/root/.ollama networks: - vectordb-network restart: unless-stopped # Vector Database API Server vectordb-api: build: . container_name: vectordb-api ports: - "8080:8080" environment: - DB_HOST=103.13.30.32 - DB_PORT=5434 - DB_USER=chatbot - DB_PASSWORD=chatbot123 - DB_NAME=testvector - OLLAMA_HOST=http://ollama:11434 - OLLAMA_MODEL=bge-m3 - PORT=8080 depends_on: - ollama networks: - vectordb-network restart: unless-stopped healthcheck: test: ["CMD", "curl", "-f", "http://localhost:11434/api/tags"] interval: 30s timeout: 10s retries: 5 networks: vectordb-network: driver: bridge volumes: ollama-data: driver: local