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

NEXT_PUBLIC_(API/WS)_URL settings aren't respected #536

Open
kursad-k opened this issue Dec 28, 2024 · 1 comment
Open

NEXT_PUBLIC_(API/WS)_URL settings aren't respected #536

kursad-k opened this issue Dec 28, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@kursad-k
Copy link

kursad-k commented Dec 28, 2024

Hi,

I override these in the docker-compose file because I am running it behind a VPN and the browser clients need to access the service on other VPN connected devices, however none of those clients can successfully open the page because of network access issue it seems.

I can access and use the app on the computer that is running it under WSL Docker, but other devices on the same VPN network can't fully load the page. The user only sees a loading circle (see the image) The browser console prints the lines below.

453-64f6ddb9c5055700.js:1 
 GET http://127.0.0.1:3001/api/models net::ERR_CONNECTION_REFUSED

Respective docker compose env variables. These IPs normally default to 127.0.0.1 in the original docker compose file.

perplexica-frontend:
    build:
      context: .
      dockerfile: app.dockerfile
      args:
        - NEXT_PUBLIC_API_URL=http://VPN-IP-OF-THE-WSL:3001/api
        - NEXT_PUBLIC_WS_URL=ws://VPN-IP-OF-THE-WLS:3001
http://VPN-IP-OF-THE-WSL:3001/api
{"status":"ok"}

chrome_FHBDUXJpK2

@kursad-k kursad-k added the bug Something isn't working label Dec 28, 2024
@thefux
Copy link

thefux commented Dec 28, 2024

Same, I workaround the issue by setting the urls in the environment section

      environment:
        - NEXT_PUBLIC_API_URL=http://VPN-IP-OF-THE-WSL:3001/api
        - NEXT_PUBLIC_WS_URL=ws://VPN-IP-OF-THE-WLS:3001

hope this help

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

2 participants