TEN-framework / TEN-Agent

TEN Agent is the world’s first real-time multimodal agent integrated with the OpenAI Realtime API, RTC, and features weather checks, web search, vision, and RAG capabilities.
https://agent.theten.ai/
Apache License 2.0
1.37k stars 154 forks source link

[Feature Request] Deployment issue: localhost pointing to the deployed URL #223

Closed limujun closed 2 weeks ago

limujun commented 2 months ago

我在服务器部署了本项目,通过docker compose up启动,关于astra_playground和astra_graph_designer链接指向都是localhost:8080和localhost:49483,我本机的电脑并没有部署相关服务,造成agents功能以及gd server找不到数据。astra_playground我通过修改.env文件添加NEXT_PUBLIC_REQUEST_URL参数为我服务器IP解决了,但是astra_graph_designer服务我修改.env文件NEXT_PUBLIC_USE_MOCK,并不能重新编译,希望提供一个服务器部署方案。 WechatIMG158

十分感谢!

cyfyifanchen commented 2 months ago

@limujun, good to have this issue. Right now, we don’t think having Graph Designer on the cloud is a good idea, as it’s not productive from a development standpoint. Simply using it locally for development and testing is more than enough. You don’t need to have it on the cloud.

I see your point, as some other providers are doing so; therefore, I’m going to label this issue with "enhancement" and “question,” and we’ll see what we can do later. Meanwhile, if you have time, please go ahead and translate the issue into English. Making the community international will benefit all contributors.

Appreciated.

plutoless commented 2 months ago

the problem is graph designer is using next.js, and NEXT_PUBLIC_REQUEST_URL mainly works on compile time, not runtime. if you are using our pre-compiled version in docker compose, you won't be able to change the pointing URL. because it's next.js, one potential solution is to add api handlers to graph designer so that the api will access its local relative service endpoints. so in the end, the front-end should access backend based on relative url instead of absolute one. the request is handed over to next.js front-end service and then redirected to server localhost.

plutoless commented 2 weeks ago

close for no response. please reopen if issue persists.