NextChat icon indicating copy to clipboard operation
NextChat copied to clipboard

[求助]next-web曾经在添加proxy_url之后就不会监听0.0.0.0,只会监听127.0.0.1这个问题是如何解决的呢?

Open xiazhibin opened this issue 10 months ago • 6 comments

Bug Description

Dockerfile里面如果有proxy_url这个环境变化,就会 export HOSTNAME="127.0.0.1";

Steps to Reproduce

wu

Expected Behavior

wu

Screenshots

No response

Deployment Method

  • [ ] Docker
  • [ ] Vercel
  • [ ] Server

Desktop OS

No response

Desktop Browser

No response

Desktop Browser Version

No response

Smartphone Device

No response

Smartphone OS

No response

Smartphone Browser

No response

Smartphone Browser Version

No response

Additional Logs

No response

xiazhibin avatar Apr 25 '24 03:04 xiazhibin

Please follow the issue template to update title and description of your issue.

nextchat-manager[bot] avatar Apr 25 '24 03:04 nextchat-manager[bot]

Bot detected the issue body's language is not English, translate it automatically.


Title: [Help] Next-web once added proxy_url and it would no longer listen to 0.0.0.0, but would only listen to 127.0.0.1. How to solve this problem?

Issues-translate-bot avatar Apr 25 '24 03:04 Issues-translate-bot

让docker container使用代理有点tricky,如果你使用了项目里的PROYX_URL=环境变量,可以尝试同时设置network_mode="host"

或者参考Docker docs中的run-containers-with-a-proxy-configuration设置。

Kosette avatar Apr 25 '24 10:04 Kosette

Bot detected the issue body's language is not English, translate it automatically.


It is a bit tricky to let the docker container use the proxy. If you use the PROYX_URL= environment variable in the project, you can try setting network_mode="host" at the same time.

Or refer to the run-containers-with-a-proxy-configuration settings in Docker docs.

Issues-translate-bot avatar Apr 25 '24 10:04 Issues-translate-bot

让docker container使用代理有点tricky,如果你使用了项目里的PROYX_URL=环境变量,可以尝试同时设置network_mode="host"

或者参考Docker docs中的run-containers-with-a-proxy-configuration设置。

好的,我试一试。真的好奇怪,我看Dockerfile不是已经写死了hostname,用PROXY_URL的时候应该不再监听0.0.0.0才对,但是next-web是监听0.0.0.0

xiazhibin avatar Apr 26 '24 07:04 xiazhibin

Bot detected the issue body's language is not English, translate it automatically.


It is a bit tricky to let the docker container use the proxy. If you use the PROYX_URL= environment variable in the project, you can try setting network_mode="host" at the same time.

Or refer to the run-containers-with-a-proxy-configuration settings in Docker docs.

OK, I'll give it a try. It’s really strange. I don’t think the hostname has been hardcoded in the Dockerfile. When using PROXY_URL, it should no longer monitor 0.0.0.0, but next-web monitors 0.0.0.0.

Issues-translate-bot avatar Apr 26 '24 07:04 Issues-translate-bot