Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting HTTP 404 on location /undefined/models while the frontend wheel is spinning #563

Open
Atomique opened this issue Jan 14, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@Atomique
Copy link

Describe the bug
If I start up my docker compose setup (I have not directly hosted it from your git repository, I built my own docker-compose.yaml) I get this error while connecting to the frontend. I am using traefik in front of the frontend to secure it with SSL, but I also tried to get it working while connecting to the direct frontend ip and port.

To Reproduce
Steps to reproduce the behavior:

Host it with this docker-compose.yaml

perplexica-backend:
    image: itzcrazykns1337/perplexica-backend:v1.9.3
    networks: ['backend']
    # already resides in the config.toml
    #environment:
    #  - SEARXNG_API_URL=https://searxng.domain.tld
    depends_on:
      - searxng
    ports:
      - 3001:3001
    volumes:
      - perplexica-backend-data:/home/perplexica/data
      - perplexica-backend-uploads:/home/perplexica/uploads
      - ./configs/perplexica-backend/config.toml:/home/perplexica/config.toml
    extra_hosts:
      - 'host.docker.internal:host-gateway'
    restart: unless-stopped

  perplexica-frontend:
    image: cr.domain.tld/docker/perplexica-frontend:v1.9.3
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.perplexica.rule=Host(`perplexica.domain.tld`)"
      - "traefik.http.routers.perplexica.entrypoints=websecure"
      - "traefik.http.routers.perplexica.tls=true"
      - "traefik.http.services.perplexica.loadbalancer.server.port=3000"
    networks: ['backend']
    environment:
      - NEXT_PUBLIC_API_URL=http://perplexica-backend:3001/api
      - NEXT_PUBLIC_WS_URL=ws://perplexica-backend:3001=value
    depends_on:
      - perplexica-backend
    ports:
      - 3000:3000
    restart: unless-stopped

The config.toml file used:

[GENERAL]
PORT = 3001 # Port to run the server on
SIMILARITY_MEASURE = "cosine" # "cosine" or "dot"
KEEP_ALIVE = "5m" # How long to keep Ollama models loaded into memory. (Instead of using -1 use "-1m")

[API_KEYS]
OPENAI = "REDACTED" # OpenAI API key - sk-1234567890abcdef1234567890abcdef
GROQ = "" # Groq API key - gsk_1234567890abcdef1234567890abcdef
ANTHROPIC = "REDACTED" # Anthropic API key - sk-ant-1234567890abcdef1234567890abcdef
GEMINI = "" # Gemini API key - sk-1234567890abcdef1234567890abcdef

[API_ENDPOINTS]
SEARXNG = "http://searxng:8080" # SearxNG API URL
OLLAMA = "http://ollama:11434" # Ollama API URL - http://host.docker.internal:11434

Note:
I was forced to change the app.dockerfile because I was not able to get it connected with my other services:

FROM node:20.18.0-alpine

#ENV NEXT_PUBLIC_WS_URL=${NEXT_PUBLIC_WS_URL}
#ENV NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_WS_URL}

WORKDIR /home/perplexica

COPY ui /home/perplexica/

RUN yarn install --frozen-lockfile
RUN yarn build

CMD ["yarn", "start"]

Expected behavior
A working frontend to use perplexica

Screenshots
image

Additional context
Would be nice to find a solution, seems really hard for me to host this application outside of the git-repository docker-compose setup and I dont know why. I also found this to fix my problems with the dockerfile, but maybe this is giving me the problems I have now:

Thanks a lot for your work and help. Appreciate it!

@Atomique Atomique added the bug Something isn't working label Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant