# Ollama + Open WebUI + Qdrant: stack recipe from https://archestack.com/stacks/local-rag-ollama-open-webui-qdrant/
# Started and checked 2026-11-19 on ubuntu-lan (x86-64, CPU only, Docker 29.9.2, Compose v5.6.1). Images are pinned: bump them on purpose.
services:
  ollama:
    image: ollama/ollama:0.40.16
    restart: unless-stopped
    volumes:
      - ollama:/root/.ollama
    healthcheck:
      test: ["CMD", "ollama", "list"]
      interval: 10s
      retries: 12
  qdrant:
    image: qdrant/qdrant:v1.20.2
    restart: unless-stopped
    ports:
      - "127.0.0.1:6333:6333"
    volumes:
      - qdrant:/qdrant/storage
  open-webui:
    image: ghcr.io/open-webui/open-webui:v0.13.4
    restart: unless-stopped
    depends_on:
      ollama:
        condition: service_healthy
      qdrant:
        condition: service_started
    ports:
      - "127.0.0.1:3000:8080"
    environment:
      OLLAMA_BASE_URL: http://ollama:11434
      VECTOR_DB: qdrant
      QDRANT_URI: http://qdrant:6333
      WEBUI_SECRET_KEY: ${WEBUI_SECRET_KEY:?run the .env line first}
    volumes:
      - open-webui:/app/backend/data
volumes:
  ollama:
  qdrant:
  open-webui:
