From d411159124925420cff793fa05afdbd6783845d6 Mon Sep 17 00:00:00 2001 From: Ruoxi Wang Date: Tue, 14 May 2024 19:31:53 +0800 Subject: [PATCH 1/3] Dockerfile: Listen to any addresses instead of localhost, fixes #4682 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 436d39d821d..ae9a17cddbd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -43,7 +43,7 @@ COPY --from=builder /app/.next/server ./.next/server EXPOSE 3000 CMD if [ -n "$PROXY_URL" ]; then \ - export HOSTNAME="127.0.0.1"; \ + export HOSTNAME="0.0.0.0"; \ protocol=$(echo $PROXY_URL | cut -d: -f1); \ host=$(echo $PROXY_URL | cut -d/ -f3 | cut -d: -f1); \ port=$(echo $PROXY_URL | cut -d: -f3); \ From cf29a8f2c8fce4b8fd171a7fa7c401c98228786a Mon Sep 17 00:00:00 2001 From: fred-bf <157469842+fred-bf@users.noreply.github.com> Date: Wed, 15 May 2024 18:13:40 +0800 Subject: [PATCH 2/3] chore: custom node listen address by `--host` flag --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index ae9a17cddbd..51a810fc5a3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -43,7 +43,7 @@ COPY --from=builder /app/.next/server ./.next/server EXPOSE 3000 CMD if [ -n "$PROXY_URL" ]; then \ - export HOSTNAME="0.0.0.0"; \ + export HOSTNAME="127.0.0.1"; \ protocol=$(echo $PROXY_URL | cut -d: -f1); \ host=$(echo $PROXY_URL | cut -d/ -f3 | cut -d: -f1); \ port=$(echo $PROXY_URL | cut -d: -f3); \ @@ -58,7 +58,7 @@ CMD if [ -n "$PROXY_URL" ]; then \ echo "[ProxyList]" >> $conf; \ echo "$protocol $host $port" >> $conf; \ cat /etc/proxychains.conf; \ - proxychains -f $conf node server.js; \ + proxychains -f $conf node server.js --host 0.0.0.0; \ else \ node server.js; \ fi From e58cb2b0db2db3280dc2288fdabaf87e38abb69f Mon Sep 17 00:00:00 2001 From: fred-bf <157469842+fred-bf@users.noreply.github.com> Date: Thu, 16 May 2024 14:11:27 +0800 Subject: [PATCH 3/3] chore: wrap the node command flag --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 51a810fc5a3..0838029fded 100644 --- a/Dockerfile +++ b/Dockerfile @@ -58,7 +58,7 @@ CMD if [ -n "$PROXY_URL" ]; then \ echo "[ProxyList]" >> $conf; \ echo "$protocol $host $port" >> $conf; \ cat /etc/proxychains.conf; \ - proxychains -f $conf node server.js --host 0.0.0.0; \ + proxychains -f $conf "node server.js --host 0.0.0.0"; \ else \ node server.js; \ fi