OldAIProjects / OldAGiXT-Frontend

Front end for Agent-LLM.
MIT License
31 stars 12 forks source link

Docker container NEXT_PUBLIC_API_URI Env doesn't work #8

Open kanslor opened 1 year ago

kanslor commented 1 year ago

Description

When I pull this frontend package as container ,It seems access the backend API address http://localhost:7437 ,I tried to change the container Environment NEXT_PUBLIC_API_URI to the other Address , makes the frontend remote accessed. but the frontend container still access to http://localhost:7437

Steps to Reproduce the Bug

  1. git clone Agent-LLM reposity git clone https://github.com/Josh-XT/Agent-LLM.
  2. cd Agent-LLM/
  3. sudo docker-compose up -d to run container
  4. change the docker container agent-llm_frontend_1 Env NEXT_PUBLIC_API_URI by managent service such as portainer.
  5. save changes and restart container
  6. use other computer's web browser to open http:{ip}:3000,and open the development tool to check.

Expected Behavior

can access the backend as local do.

Actual Behavior

shows network error,and the frontend still access http://localhost:7437

Additional Context / Screenshots

No response

Operating System

Python Version

Environment Type - Connection

Environment Type - Container

Acknowledgements

DIGist commented 1 year ago

Hey, I had the same problem, I'm not sure what the long term fix is, but the short term fix is set that variable in .env.local and build the docker container image locally, at least that's what worked for me.