services:
  ollama:
    image: "ollama/ollama"
    volumes:
      - "ollama:/root/.ollama"
    ports:
      - "11434:11434"
    environment:
      OLLAMA_HOST: "0.0.0.0"
  open-webui:
    image: "ghcr.io/open-webui/open-webui:main"
    restart: "always"
    extra_hosts:
      - "host.docker.internal:host-gateway"
    volumes:
      - "open-webui:/app/backend/data"
    ports:
      - "8869:8080"
    environment:
      DATABASE_URL: "postgresql://mrsm:mrsm@host.docker.internal:5432/openwebui"
      OLLAMA_BASE_URL: "http://ollama:11434"
volumes:
  open-webui:
  ollama:
