diff --git a/gui/Containerfile.node.alpine b/gui/Containerfile.node.alpine index c102f75fe..2e8a6c578 100644 --- a/gui/Containerfile.node.alpine +++ b/gui/Containerfile.node.alpine @@ -2,6 +2,8 @@ FROM docker.io/node:18-alpine ENV PATH="${PATH}:$(yarn global bin)" +ENV ONNX_WEB_DEV_HOST="0.0.0.0" + WORKDIR /onnx-web # copy package first, to invalidate other layers when version changes diff --git a/gui/Containerfile.node.buster b/gui/Containerfile.node.buster index 6afd06b01..0c00c05d2 100644 --- a/gui/Containerfile.node.buster +++ b/gui/Containerfile.node.buster @@ -2,6 +2,8 @@ FROM docker.io/node:18-buster ENV PATH="${PATH}:$(yarn global bin)" +ENV ONNX_WEB_DEV_HOST="0.0.0.0" + WORKDIR /onnx-web # copy package first, to invalidate other layers when version changes diff --git a/gui/serve.js b/gui/serve.js index 10cabbb16..9901d88dc 100644 --- a/gui/serve.js +++ b/gui/serve.js @@ -5,7 +5,7 @@ import { join } from 'path'; const { env } = process; -const host = mustDefault(env.ONNX_WEB_DEV_HOST, '0.0.0.0'); +const host = mustDefault(env.ONNX_WEB_DEV_HOST, '127.0.0.1'); const port = mustDefault(env.ONNX_WEB_DEV_PORT, '3000'); const root = process.cwd();