-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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_URL not used when using pre-built Docker images #460
Comments
Can confirm.
I'm able to use perplexica from another device in my lan. If I only change the env while using the prebuilt image or build with 127.0.0.1:3001 as arg, it throws the same error as op. Most likely something that happened since v1.9.0-rc. I had a similar issue and used a different prebuilt image which was based on an older built #142 (comment) . Edit: the working built was [email protected] |
I can confirm that the same issue happens to me. |
I worked on rewriting the Docker images (reducing their size by -65% and securing them) and also fixed the issue with the ENV vars so that they can be used without rebuilding the Docker images. It uses the The PR is here: #465. I did this PR because I'm working on the Helm Chart to deploy Perplexica on Kubernetes, and I had this issue with the official Docker images. |
Please refer to: #388 |
Describe the bug
Using pre-built images for docker-front env variable can't be overriden.
itzcrazykns1337/perplexica-frontend:main
To Reproduce
Docker compose setup:
perplexica-frontend:
image: itzcrazykns1337/perplexica-frontend:main
container_name: perplexica-frontend
environment:
- NEXT_PUBLIC_API_URL=https://perplexica-back.MYDOMAIN/api
- NEXT_PUBLIC_WS_URL=wss://perplexica-back.MYDOMAIN
depends_on:
- perplexica-backend
volumes:
- ./perplexica-config.toml:/home/perplexica/config.toml
ports:
- 3980:3000
restart: unless-stopped
Chrome console
GET http://127.0.0.1:3001/api/models net::ERR_CONNECTION_REFUSED
Checking in container I See the env correctly set
/home/perplexica # env
NODE_VERSION=23.1.0
HOSTNAME=ebf749acf153
YARN_VERSION=1.22.22
SHLVL=1
HOME=/root
TERM=xterm-256color
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
NEXT_PUBLIC_WS_URL=wss://perplexica-back.MYDOMAIN
LANG=C.UTF-8
NEXT_PUBLIC_API_URL=https://perplexica-back.MYDOMAIN/api
LC_ALL=C.UTF-8
PWD=/home/perplexica
/home/perplexica #
Expected behavior
ENV used if added in docker-compose.
Screenshots
N/A
Additional context
Ability to setup perplexica in remote servers and not rely on 127.0.0.1:3001 that seem hard coded or can't be overriden in pre-build images: itzcrazykns1337/perplexica-frontend:main
The text was updated successfully, but these errors were encountered: