ItzCrazyKns / Perplexica

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

Hardcoded reference to localhost (?) #69

Open r2fo opened 5 months ago

r2fo commented 5 months ago

Describe the bug I git cloned the repo on my headless server, modified the configuration in docker-compose.yml to point to my public IP address and port forwarded port 3000, 3001 and 4000 (just for testing). I tried accessing PUBLIC-IP:3000, the page loads but there is an Infinite scroll wheel. I checked the browser console and it is trying to connect to http://127.0.0.1:3001/api/models which fails as I opened the page on another device.

To Reproduce Steps to reproduce the behavior:

  1. Git clone the repository,
  2. Adjust config.toml and docker-compose.yml
  3. Port forward the ports
  4. Load the page through another device
  5. You will see a CORS error in the browser console

Expected behavior I expect it to connect to the value I set for NEXT_PUBLIC_API_URL in the docker-compose.yml and not 127.0.0.1

Screenshots

Screenshot 2024-05-05 at 19 57 25
Donzhu2020 commented 5 months ago
Snipaste_2024-05-05_20-45-17

I have the same issue

teknowill commented 5 months ago

running docker from Ubuntu 22

same

changed args:

Chrome:
Failed to load resource: 127.0.0.1:3001/api/models:1 net::ERR_CONNECTION_REFUSED

Firefox: Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://127.0.0.1:3001/api/models. (Reason: CORS request did not succeed). Status code: (null). 2 Uncaught (in promise) TypeError: NetworkError when attempting to fetch resource.

seems to be something loaded client side, don't see a docker log

874d2e5b4aa2 perplexica-perplexica-frontend "docker-entrypoint.s…" 14 minutes ago Up 14 minutes 0.0.0.0:3000->3000/tcp, :::3000->3000/tcp perplexica-perplexica-frontend-1 733e6332df49 perplexica-perplexica-backend "docker-entrypoint.s…" 15 minutes ago Up 14 minutes 0.0.0.0:3001->3001/tcp, :::3001->3001/tcp perplexica-perplexica-backend-1 b2f9fbdfbd8d perplexica-searxng "/sbin/tini -- /usr/…" 15 minutes ago Up 14 minutes 4000/tcp, 0.0.0.0:4000->8080/tcp, :::4000->8080/tcp perplexica-searxng-1

docker logs

docker logs 874d2e5b4aa2 yarn run v1.22.19 $ next start ▲ Next.js 14.1.4

docker logs 733e6332df49 yarn run v1.22.19 $ node dist/app.js info: WebSocket server started on port 3001 (node:28) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead. (Use node --trace-deprecation ... to show where the warning was created) info: Server is running on port 3001

sear works fine on port 4000

docker logs b2f9fbdfbd8d SearXNG version 2024.5.5+ac430a9ea Create /etc/searxng/uwsgi.ini Use existing /etc/searxng/settings.yml Listen on 0.0.0.0:8080 [uWSGI] getting INI configuration from /etc/searxng/uwsgi.ini [uwsgi-static] added mapping for /static => /usr/local/searxng/searx/static Starting uWSGI 2.0.23 (64bit) on [Mon May 6 02:08:34 2024] compiled with version: 13.2.1 20231014 on 30 November 2023 14:34:33 os: Linux-6.8.4-2-pve #1 SMP PREEMPT_DYNAMIC PMX 6.8.4-2 (2024-04-10T17:36Z) nodename: b2f9fbdfbd8d machine: x86_64 clock source: unix pcre jit disabled detected number of CPU cores: 42 current working directory: /usr/local/searxng detected binary path: /usr/sbin/uwsgi chdir() to /usr/local/searxng/searx/ your processes number limit is 2063359 your memory page size is 4096 bytes detected max file descriptor number: 524288 building mime-types dictionary from file /etc/mime.types...1390 entry found lock engine: pthread robust mutexes thunder lock: disabled (you can enable it with --thunder-lock) uwsgi socket 0 bound to TCP address 0.0.0.0:8080 fd 3 Python version: 3.11.9 (main, Apr 14 2024, 13:40:00) [GCC 13.2.1 20231014] Python main interpreter initialized at 0x73118b4d1718 python threads support enabled your server socket listen backlog is limited to 100 connections your mercy for graceful operations on workers is 60 seconds mapped 5188896 bytes (5067 KB) for 168 cores Operational MODE: preforking+threaded added /usr/local/searxng/ to pythonpath. spawned uWSGI master process (pid: 7) spawned uWSGI worker 1 (pid: 12, cores: 4) spawned uWSGI worker 2 (pid: 14, cores: 4) spawned 4 offload threads for uWSGI worker 1 spawned uWSGI worker 3 (pid: 18, cores: 4) spawned 4 offload threads for uWSGI worker 2 spawned uWSGI worker 4 (pid: 24, cores: 4) spawned 4 offload threads for uWSGI worker 3 spawned uWSGI worker 5 (pid: 30, cores: 4) spawned 4 offload threads for uWSGI worker 4 spawned uWSGI worker 6 (pid: 35, cores: 4) spawned 4 offload threads for uWSGI worker 5 spawned uWSGI worker 7 (pid: 40, cores: 4) spawned 4 offload threads for uWSGI worker 6 spawned uWSGI worker 8 (pid: 45, cores: 4) spawned 4 offload threads for uWSGI worker 7 spawned uWSGI worker 9 (pid: 51, cores: 4) spawned 4 offload threads for uWSGI worker 8 spawned uWSGI worker 10 (pid: 55, cores: 4) spawned 4 offload threads for uWSGI worker 9 spawned uWSGI worker 11 (pid: 60, cores: 4) spawned 4 offload threads for uWSGI worker 10 spawned uWSGI worker 12 (pid: 65, cores: 4) spawned 4 offload threads for uWSGI worker 11 spawned uWSGI worker 13 (pid: 70, cores: 4) spawned 4 offload threads for uWSGI worker 12 spawned uWSGI worker 14 (pid: 75, cores: 4) spawned 4 offload threads for uWSGI worker 13 spawned uWSGI worker 15 (pid: 80, cores: 4) spawned 4 offload threads for uWSGI worker 14 spawned uWSGI worker 16 (pid: 86, cores: 4) spawned 4 offload threads for uWSGI worker 15 spawned uWSGI worker 17 (pid: 90, cores: 4) spawned 4 offload threads for uWSGI worker 16 spawned uWSGI worker 18 (pid: 94, cores: 4) spawned 4 offload threads for uWSGI worker 17 spawned uWSGI worker 19 (pid: 101, cores: 4) spawned 4 offload threads for uWSGI worker 18 spawned 4 offload threads for uWSGI worker 19 spawned uWSGI worker 20 (pid: 107, cores: 4) spawned uWSGI worker 21 (pid: 110, cores: 4) spawned 4 offload threads for uWSGI worker 20 spawned 4 offload threads for uWSGI worker 21 spawned uWSGI worker 22 (pid: 117, cores: 4) spawned uWSGI worker 23 (pid: 121, cores: 4) spawned 4 offload threads for uWSGI worker 22 spawned uWSGI worker 24 (pid: 126, cores: 4) spawned 4 offload threads for uWSGI worker 23 spawned uWSGI worker 25 (pid: 129, cores: 4) spawned 4 offload threads for uWSGI worker 24 spawned uWSGI worker 26 (pid: 133, cores: 4) spawned 4 offload threads for uWSGI worker 25 spawned uWSGI worker 27 (pid: 140, cores: 4) spawned 4 offload threads for uWSGI worker 26 spawned uWSGI worker 28 (pid: 146, cores: 4) spawned 4 offload threads for uWSGI worker 27 spawned uWSGI worker 29 (pid: 151, cores: 4) spawned 4 offload threads for uWSGI worker 28 spawned uWSGI worker 30 (pid: 156, cores: 4) spawned 4 offload threads for uWSGI worker 29 spawned uWSGI worker 31 (pid: 158, cores: 4) spawned 4 offload threads for uWSGI worker 30 spawned uWSGI worker 32 (pid: 165, cores: 4) spawned 4 offload threads for uWSGI worker 31 spawned uWSGI worker 33 (pid: 168, cores: 4) spawned uWSGI worker 34 (pid: 171, cores: 4) spawned 4 offload threads for uWSGI worker 32 spawned 4 offload threads for uWSGI worker 33 spawned uWSGI worker 35 (pid: 181, cores: 4) spawned 4 offload threads for uWSGI worker 34 spawned uWSGI worker 36 (pid: 186, cores: 4) spawned 4 offload threads for uWSGI worker 35 spawned 4 offload threads for uWSGI worker 36 spawned uWSGI worker 37 (pid: 192, cores: 4) spawned 4 offload threads for uWSGI worker 37 spawned uWSGI worker 38 (pid: 197, cores: 4) spawned uWSGI worker 39 (pid: 198, cores: 4) spawned uWSGI worker 40 (pid: 199, cores: 4) spawned 4 offload threads for uWSGI worker 38 spawned 4 offload threads for uWSGI worker 39 spawned uWSGI worker 41 (pid: 208, cores: 4) spawned uWSGI worker 42 (pid: 210, cores: 4) spawned 4 offload threads for uWSGI worker 40 spawned 4 offload threads for uWSGI worker 41 spawned 4 offload threads for uWSGI worker 42 2024-05-06 02:08:36,644 WARNING:searx.botdetection.config: missing config file: /etc/searxng/limiter.toml WSGI app 0 (mountpoint='') ready in 2 seconds on interpreter 0x73118b4d1718 pid: 186 (default app) 2024-05-06 02:08:36,710 WARNING:searx.botdetection.config: missing config file: /etc/searxng/limiter.toml WSGI app 0 (mountpoint='') ready in 2 seconds on interpreter 0x73118b4d1718 pid: 192 (default app) 2024-05-06 02:08:36,728 WARNING:searx.botdetection.config: missing config file: /etc/searxng/limiter.toml WSGI app 0 (mountpoint='') ready in 2 seconds on interpreter 0x73118b4d1718 pid: 165 (default app) 2024-05-06 02:08:36,768 WARNING:searx.botdetection.config: missing config file: /etc/searxng/limiter.toml WSGI app 0 (mountpoint='') ready in 2 seconds on interpreter 0x73118b4d1718 pid: 126 (default app) 2024-05-06 02:08:36,773 WARNING:searx.botdetection.config: missing config file: /etc/searxng/limiter.toml WSGI app 0 (mountpoint='') ready in 2 seconds on interpreter 0x73118b4d1718 pid: 45 (default app) 2024-05-06 02:08:36,801 WARNING:searx.botdetection.config: missing config file: /etc/searxng/limiter.toml WSGI app 0 (mountpoint='') ready in 2 seconds on interpreter 0x73118b4d1718 pid: 30 (default app) 2024-05-06 02:08:36,824 WARNING:searx.botdetection.config: missing config file: /etc/searxng/limiter.toml WSGI app 0 (mountpoint='') ready in 2 seconds on interpreter 0x73118b4d1718 pid: 101 (default app) 2024-05-06 02:08:36,838 WARNING:searx.botdetection.config: missing config file: /etc/searxng/limiter.toml WSGI app 0 (mountpoint='') ready in 2 seconds on interpreter 0x73118b4d1718 pid: 210 (default app) 2024-05-06 02:08:36,838 WARNING:searx.botdetection.config: missing config file: /etc/searxng/limiter.toml WSGI app 0 (mountpoint='') ready in 2 seconds on interpreter 0x73118b4d1718 pid: 158 (default app) 2024-05-06 02:08:36,843 WARNING:searx.botdetection.config: missing config file: /etc/searxng/limiter.toml WSGI app 0 (mountpoint='') ready in 2 seconds on interpreter 0x73118b4d1718 pid: 129 (default app) 2024-05-06 02:08:36,853 WARNING:searx.botdetection.config: missing config file: /etc/searxng/limiter.toml WSGI app 0 (mountpoint='') ready in 2 seconds on interpreter 0x73118b4d1718 pid: 197 (default app) 2024-05-06 02:08:36,856 WARNING:searx.botdetection.config: missing config file: /etc/searxng/limiter.toml WSGI app 0 (mountpoint='') ready in 2 seconds on interpreter 0x73118b4d1718 pid: 35 (default app) 2024-05-06 02:08:36,861 WARNING:searx.botdetection.config: missing config file: /etc/searxng/limiter.toml WSGI app 0 (mountpoint='') ready in 2 seconds on interpreter 0x73118b4d1718 pid: 94 (default app) 2024-05-06 02:08:36,862 WARNING:searx.botdetection.config: missing config file: /etc/searxng/limiter.toml WSGI app 0 (mountpoint='') ready in 2 seconds on interpreter 0x73118b4d1718 pid: 208 (default app) 2024-05-06 02:08:36,873 WARNING:searx.botdetection.config: missing config file: /etc/searxng/limiter.toml WSGI app 0 (mountpoint='') ready in 2 seconds on interpreter 0x73118b4d1718 pid: 168 (default app) 2024-05-06 02:08:36,881 WARNING:searx.botdetection.config: missing config file: /etc/searxng/limiter.toml WSGI app 0 (mountpoint='') ready in 2 seconds on interpreter 0x73118b4d1718 pid: 70 (default app) 2024-05-06 02:08:36,886 WARNING:searx.botdetection.config: missing config file: /etc/searxng/limiter.toml WSGI app 0 (mountpoint='') ready in 2 seconds on interpreter 0x73118b4d1718 pid: 12 (default app) 2024-05-06 02:08:36,922 WARNING:searx.botdetection.config: missing config file: /etc/searxng/limiter.toml WSGI app 0 (mountpoint='') ready in 2 seconds on interpreter 0x73118b4d1718 pid: 107 (default app) 2024-05-06 02:08:36,947 WARNING:searx.botdetection.config: missing config file: /etc/searxng/limiter.toml WSGI app 0 (mountpoint='') ready in 2 seconds on interpreter 0x73118b4d1718 pid: 133 (default app) 2024-05-06 02:08:36,951 WARNING:searx.botdetection.config: missing config file: /etc/searxng/limiter.toml WSGI app 0 (mountpoint='') ready in 2 seconds on interpreter 0x73118b4d1718 pid: 65 (default app) 2024-05-06 02:08:36,985 WARNING:searx.botdetection.config: missing config file: /etc/searxng/limiter.toml WSGI app 0 (mountpoint='') ready in 2 seconds on interpreter 0x73118b4d1718 pid: 199 (default app) 2024-05-06 02:08:37,004 WARNING:searx.botdetection.config: missing config file: /etc/searxng/limiter.toml WSGI app 0 (mountpoint='') ready in 3 seconds on interpreter 0x73118b4d1718 pid: 121 (default app) 2024-05-06 02:08:37,025 WARNING:searx.botdetection.config: missing config file: /etc/searxng/limiter.toml WSGI app 0 (mountpoint='') ready in 3 seconds on interpreter 0x73118b4d1718 pid: 14 (default app) 2024-05-06 02:08:37,038 WARNING:searx.botdetection.config: missing config file: /etc/searxng/limiter.toml WSGI app 0 (mountpoint='') ready in 3 seconds on interpreter 0x73118b4d1718 pid: 110 (default app) 2024-05-06 02:08:37,045 WARNING:searx.botdetection.config: missing config file: /etc/searxng/limiter.toml WSGI app 0 (mountpoint='') ready in 3 seconds on interpreter 0x73118b4d1718 pid: 24 (default app) 2024-05-06 02:08:37,054 WARNING:searx.botdetection.config: missing config file: /etc/searxng/limiter.toml WSGI app 0 (mountpoint='') ready in 3 seconds on interpreter 0x73118b4d1718 pid: 171 (default app) 2024-05-06 02:08:37,056 WARNING:searx.botdetection.config: missing config file: /etc/searxng/limiter.toml WSGI app 0 (mountpoint='') ready in 3 seconds on interpreter 0x73118b4d1718 pid: 86 (default app) 2024-05-06 02:08:37,068 WARNING:searx.botdetection.config: missing config file: /etc/searxng/limiter.toml WSGI app 0 (mountpoint='') ready in 3 seconds on interpreter 0x73118b4d1718 pid: 156 (default app) 2024-05-06 02:08:37,071 WARNING:searx.botdetection.config: missing config file: /etc/searxng/limiter.toml WSGI app 0 (mountpoint='') ready in 3 seconds on interpreter 0x73118b4d1718 pid: 18 (default app) 2024-05-06 02:08:37,078 WARNING:searx.botdetection.config: missing config file: /etc/searxng/limiter.toml WSGI app 0 (mountpoint='') ready in 3 seconds on interpreter 0x73118b4d1718 pid: 55 (default app) 2024-05-06 02:08:37,090 WARNING:searx.botdetection.config: missing config file: /etc/searxng/limiter.toml WSGI app 0 (mountpoint='') ready in 3 seconds on interpreter 0x73118b4d1718 pid: 181 (default app) 2024-05-06 02:08:37,091 WARNING:searx.botdetection.config: missing config file: /etc/searxng/limiter.toml WSGI app 0 (mountpoint='') ready in 3 seconds on interpreter 0x73118b4d1718 pid: 51 (default app) 2024-05-06 02:08:37,098 WARNING:searx.botdetection.config: missing config file: /etc/searxng/limiter.toml WSGI app 0 (mountpoint='') ready in 3 seconds on interpreter 0x73118b4d1718 pid: 80 (default app) 2024-05-06 02:08:37,109 WARNING:searx.botdetection.config: missing config file: /etc/searxng/limiter.toml WSGI app 0 (mountpoint='') ready in 3 seconds on interpreter 0x73118b4d1718 pid: 40 (default app) 2024-05-06 02:08:37,116 WARNING:searx.botdetection.config: missing config file: /etc/searxng/limiter.toml WSGI app 0 (mountpoint='') ready in 3 seconds on interpreter 0x73118b4d1718 pid: 90 (default app) 2024-05-06 02:08:37,125 WARNING:searx.botdetection.config: missing config file: /etc/searxng/limiter.toml WSGI app 0 (mountpoint='') ready in 3 seconds on interpreter 0x73118b4d1718 pid: 151 (default app) 2024-05-06 02:08:37,125 WARNING:searx.botdetection.config: missing config file: /etc/searxng/limiter.toml WSGI app 0 (mountpoint='') ready in 3 seconds on interpreter 0x73118b4d1718 pid: 60 (default app) 2024-05-06 02:08:37,129 WARNING:searx.botdetection.config: missing config file: /etc/searxng/limiter.toml WSGI app 0 (mountpoint='') ready in 3 seconds on interpreter 0x73118b4d1718 pid: 75 (default app) 2024-05-06 02:08:37,132 WARNING:searx.botdetection.config: missing config file: /etc/searxng/limiter.toml WSGI app 0 (mountpoint='') ready in 3 seconds on interpreter 0x73118b4d1718 pid: 117 (default app) 2024-05-06 02:08:37,155 WARNING:searx.botdetection.config: missing config file: /etc/searxng/limiter.toml WSGI app 0 (mountpoint='') ready in 3 seconds on interpreter 0x73118b4d1718 pid: 140 (default app) 2024-05-06 02:08:37,188 WARNING:searx.botdetection.config: missing config file: /etc/searxng/limiter.toml WSGI app 0 (mountpoint='') ready in 3 seconds on interpreter 0x73118b4d1718 pid: 198 (default app) 2024-05-06 02:08:37,189 WARNING:searx.botdetection.config: missing config file: /etc/searxng/limiter.toml WSGI app 0 (mountpoint='') ready in 3 seconds on interpreter 0x73118b4d1718 pid: 146 (default app)

ItzCrazyKns commented 5 months ago

If you wish to deploy Perplexica on some sort of server, you just need to update the IP to the IP of the server / domain and rebuild the images. Other things will work perfectly fine, we unfortunately only provide support for the installation of Perplexica and not for its deployment on some server. It was meant to be hosted locally;

mr-biz commented 5 months ago

I am running it on my homelab server and want it available for my family to use on the LAN. It would be nice not to have to hard code IPs. So please can we make this a feature request?

teknowill commented 5 months ago

docker rmi perlexica*

rebuild worked, thank you!

ACK run local focus, limited support bandwidth and via remote server is a [Feature request] if it is running localhost you are 99% to remote server.

not just for homelab but in many other research settings it's not always possible to have your gpu / compute local more approval chains to get a local install verus a remote container where GPU and UI can run and working client are different systems

would also be nice to pre-configure which model to select as default from ollama (this might be there already haven't looked)

while this is working, it uses a remote ollama and can searxng and process my request (really well)

I do still get a few 404 errors in library and it'a not quite 100% the way I think it was intended to present

if you could point me in the right direction, happy to follow procedures for a potential pull request (if I can find/figure out where), happy to look for this on my own, any pointers would be appreciated, thanks again for you help and what you guy are doing.

chrome: page-62c0fca220cae375.js:1 [DEBUG] open page-62c0fca220cae375.js:1 [DEBUG] closed :3000/library?_rsc=acgkz:1

   Failed to load resource: the server responded with a status of 404 (Not Found)

t2.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=https://library.sacredheart.edu/c.php?g=29803&size=16:1

   Failed to load resource: the server responded with a status of 404 ()

:3000/library?_rsc=acgkz:1

   Failed to load resource: the server responded with a status of 404 (Not Found)

I see what you mean... lot to it

library and discover are blank, 404s ,even though they have IP# now

XHRGET http://IP#:3000/library?_rsc=acgkz [HTTP/1.1 404 Not Found 17ms]

GET http://IP#:3000/library?_rsc=acgkz Status 404 Not Found VersionHTTP/1.1 Transferred460 B (80 B size) Referrer Policystrict-origin-when-cross-origin DNS ResolutionSystem

Cache-Control
    private, no-cache, no-store, max-age=0, must-revalidate
Connection
    keep-alive
Content-Encoding
    gzip
Content-Type
    text/x-component
Date
    Mon, 06 May 2024 13:00:29 GMT
Keep-Alive
    timeout=5
Transfer-Encoding
    chunked
Vary
    RSC, Next-Router-State-Tree, Next-Router-Prefetch, Next-Url, Accept-Encoding
X-Powered-By
    Next.js

Accept
    */*
Accept-Encoding
    gzip, deflate
Accept-Language
    en-US,en;q=0.5
Connection
    keep-alive
Host
    IP#:3000
Next-Router-Prefetch
    1
Next-Router-State-Tree
    %5B%22%22%2C%7B%22children%22%3A%5B%22__PAGE__%22%2C%7B%7D%5D%7D%2Cnull%2Cnull%2Ctrue%5D
Next-Url
    /
Referer
    http://IP#:3000/library
RSC
    1
User-Agent
    Mozilla/5.0 (X11; Linux x86_64; rv:125.0) Gecko/20100101 Firefox/125.0

tried the copy button

Uncaught TypeError: navigator.clipboard is undefined NextJS 12 onClick aS aN sw sw sS sN oK iL sN uE uS page-62c0fca220cae375.js:1:7393

Donzhu2020 commented 5 months ago

I have Perplexica on docker but ollama on my local desktop, how to setup the OLLAMA API URL? 127.0.0.1:11434?

ItzCrazyKns commented 5 months ago

I am running it on my homelab server and want it available for my family to use on the LAN. It would be nice not to have to hard code IPs. So please can we make this a feature request?

Its pretty easy to expose it to network. You just need to update the IPs present the docker compose file to the private ip of the server where the backend is hosted.

ItzCrazyKns commented 5 months ago

I have Perplexica on docker but ollama on my local desktop, how to setup the OLLAMA API URL? 127.0.0.1:11434?

Please read https://github.com/ItzCrazyKns/Perplexica?tab=readme-ov-file#ollama-connection-errors

ItzCrazyKns commented 5 months ago

docker rmi perlexica*

rebuild worked, thank you!

ACK run local focus, limited support bandwidth and via remote server is a [Feature request] if it is running localhost you are 99% to remote server.

not just for homelab but in many other research settings it's not always possible to have your gpu / compute local more approval chains to get a local install verus a remote container where GPU and UI can run and working client are different systems

would also be nice to pre-configure which model to select as default from ollama (this might be there already haven't looked)

while this is working, it uses a remote ollama and can searxng and process my request (really well)

I do still get a few 404 errors in library and it'a not quite 100% the way I think it was intended to present

if you could point me in the right direction, happy to follow procedures for a potential pull request (if I can find/figure out where), happy to look for this on my own, any pointers would be appreciated, thanks again for you help and what you guy are doing.

chrome: page-62c0fca220cae375.js:1 [DEBUG] open page-62c0fca220cae375.js:1 [DEBUG] closed :3000/library?_rsc=acgkz:1

   Failed to load resource: the server responded with a status of 404 (Not Found)

t2.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=https://library.sacredheart.edu/c.php?g=29803&size=16:1

   Failed to load resource: the server responded with a status of 404 ()

:3000/library?_rsc=acgkz:1

   Failed to load resource: the server responded with a status of 404 (Not Found)

I see what you mean... lot to it

library and discover are blank, 404s ,even though they have IP# now

XHRGET http://IP#:3000/library?_rsc=acgkz [HTTP/1.1 404 Not Found 17ms]

GET http://IP#:3000/library?_rsc=acgkz Status 404 Not Found VersionHTTP/1.1 Transferred460 B (80 B size) Referrer Policystrict-origin-when-cross-origin DNS ResolutionSystem

Cache-Control
  private, no-cache, no-store, max-age=0, must-revalidate
Connection
  keep-alive
Content-Encoding
  gzip
Content-Type
  text/x-component
Date
  Mon, 06 May 2024 13:00:29 GMT
Keep-Alive
  timeout=5
Transfer-Encoding
  chunked
Vary
  RSC, Next-Router-State-Tree, Next-Router-Prefetch, Next-Url, Accept-Encoding
X-Powered-By
  Next.js

Accept
  */*
Accept-Encoding
  gzip, deflate
Accept-Language
  en-US,en;q=0.5
Connection
  keep-alive
Host
  IP#:3000
Next-Router-Prefetch
  1
Next-Router-State-Tree
  %5B%22%22%2C%7B%22children%22%3A%5B%22__PAGE__%22%2C%7B%7D%5D%7D%2Cnull%2Cnull%2Ctrue%5D
Next-Url
  /
Referer
  http://IP#:3000/library
RSC
  1
User-Agent
  Mozilla/5.0 (X11; Linux x86_64; rv:125.0) Gecko/20100101 Firefox/125.0

tried the copy button

Uncaught TypeError: navigator.clipboard is undefined NextJS 12 onClick aS aN sw sw sS sN oK iL sN uE uS page-62c0fca220cae375.js:1:7393

The library and discover pages are under development so it is intented

nirabo commented 5 months ago

I did manage to get it to work via docker-compsoe and nginx.

Here is my change in docker-compose.yml:

      ...
      args:
        - NEXT_PUBLIC_API_URL=http://api.perplexica.<my-domain>/api
        - NEXT_PUBLIC_WS_URL=ws://api.perplexica.<my-domain>

And in nginx.conf

...
    server {
        listen       80;
        server_name  perplexica.<my-domain>;

        location / {
            proxy_pass http://<LOCAL-IP>:3000;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto $scheme;
        }
    }

    server {
        listen 80;
        server_name api.perplexica.<my-domain>;

        location / {
            proxy_pass http://<LOCAL-IP>:3001;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto $scheme;

            # WebSocket support
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
        }
    }

Еxample query reviewPD

Have to say - Very happy with this tool. Thanks @ItzCrazyKns

Dalethium commented 4 months ago

Just a quick tip - you can tweak your UI package.json a bit. Change the "start" line to "start": "next start -H 0.0.0.0". This way, you won't need a reverse proxy.

But heads up, this service doesn't seem to have any backend authentication. So, make sure you've got something like Authelia for authentication.