ItzCrazyKns / Perplexica

Perplexica is an AI-powered search engine. It is an Open source alternative to Perplexity AI
MIT License
13.8k stars 1.31k forks source link

Using docker with ollama all I get is a spinning wheel #396

Open andreascschmidt opened 11 hours ago

andreascschmidt commented 11 hours ago

Describe the bug under locahost:3000 I'm only getting a spinning wheel but no search

To Reproduce I used docker-compose.yml including ollama which I linked in the config.toml

services:
  searxng:
    image: docker.io/searxng/searxng:latest
    volumes:
      - ./searxng:/etc/searxng:rw
    ports:
      - 4000:8080
    networks:
      - perplexica-network
    restart: unless-stopped

  perplexica-backend:
    build:
      context: .
      dockerfile: backend.dockerfile
    image: itzcrazykns1337/perplexica-backend:main
    environment:
      - SEARXNG_API_URL=http://searxng:8080
    depends_on:
      - searxng
    ports:
      - 3001:3001
    volumes:
      - backend-dbstore:/home/perplexica/data
      - ./config.toml:/home/perplexica/config.toml
    extra_hosts:
      - 'host.docker.internal:host-gateway'
    networks:
      - perplexica-network
    restart: unless-stopped

  perplexica-frontend:
    build:
      context: .
      dockerfile: app.dockerfile
      args:
        - NEXT_PUBLIC_API_URL=http://127.0.0.1:3001/api
        - NEXT_PUBLIC_WS_URL=ws://127.0.0.1:3001
    image: itzcrazykns1337/perplexica-frontend:main
    depends_on:
      - perplexica-backend
    ports:
      - 3000:3000
    networks:
      - perplexica-network
    restart: unless-stopped

  ollama:
    volumes:
      - ./ollama:/root/.ollama
    ports:
      - 11434:11434
    container_name: ollama
    image: ollama/ollama

networks:
  perplexica-network:

volumes:
  backend-dbstore:

config.toml OLLAMA = "http://host.docker.internal:11434"

Screenshot from 2024-10-06 15-06-54

ItzCrazyKns commented 10 hours ago

What Ollama address are you using?

andreascschmidt commented 10 hours ago

in the docker compose

ollama: volumes:

and in the config file OLLAMA = "http://host.docker.internal:11434/" I also tried localhost

I've checked with netstat the port is open