wayilive

wayilive

V2EX member #37554, joined on 2013-04-15 00:12:42 +08:00
Today's activity rank 6034
Per wayilive's settings, the topics list is hidden
Deals info, including closed deals, is not hidden
wayilive's recent replies
dG91Y2h4LnNuQDg3NDIwOC54eXo=
谢谢
这个跟 38 刀的 The DC9 Plan 哪个线路好?
@amery2010 #11 试了三台不同的服务器都一样,然后问了一下 AI ,DS 给出的解答是“Next.js 默认的 app.listen 配置可能未显式指定监听地址,导致容器绑定到内部 IP (如 localhost 或容器 ID )。需强制绑定到 0.0.0.0 以允许外部访问。”

通过 DS 给出的解决方案,选了最简单的在 docker run 的时候指定-e HOSTNAME=0.0.0.0 就可以正常访问了,此时 docker logs 显示的是监听 http://localhost:3000 和 http://0.0.0.0:3000 。

所以不能简单的说是 docker 相关设置的问题,DS 给出的其他解决方案包括在“在 package.json 的 start 脚本中增加 --hostname 0.0.0.0 参数”,“在 Dockerfile 中定义 HOSTNAME 环境变量”等,供您参考。
@amery2010 #9 很奇怪,按 README 运行 docker 之后查看 docker logs
❯ docker logs deep-research
▲ Next.js 15.3.1
- Local: http://060b0f555165:3000
- Network: http://060b0f555165:3000

✓ Starting...
✓ Ready in 130ms
尝试本机访问
❯ curl 127.0.0.1:3000
curl: (7) Failed to connect to 127.0.0.1 port 3000 after 0 ms: Couldn't connect to server
❯ curl http://060b0f555165:3000
curl: (6) Could not resolve host: 060b0f555165
❯ curl http://localhost:3000
curl: (7) Failed to connect to localhost port 3000 after 1 ms: Couldn't connect to server
如何通过 docker 在 vps 上部署并对外提供 web 访问?
Mar 2, 2023
Replied to a topic by flypei › 推广 › T 楼! T 楼! 送 YouTube Premium 会员 一年
盖楼占位
必须支持一下
Sep 24, 2021
Replied to a topic by wayilive › NAS › Gen10 Plus 方案及 windows 系统版本选择求助
@EricInBj #13 哈哈,果然很像,请教下,OneDrive 同步用哪个?我除了还想用一下群晖的 app,其他真差不多
@Morxi #14 学习了
Sep 23, 2021
Replied to a topic by wayilive › NAS › Gen10 Plus 方案及 windows 系统版本选择求助
@SIGEV13 #7 太感谢了,我先学习一下
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   913 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 10ms · UTC 20:53 · PVG 04:53 · LAX 12:53 · JFK 15:53
♥ Do have faith in what you're doing.