Skip to content

Commit

Permalink
fix(gui): bind dev server to localhost by default, open binding in co…
Browse files Browse the repository at this point in the history
…ntainers
  • Loading branch information
ssube committed Jan 8, 2023
1 parent 8c133e9 commit fc988e4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions gui/Containerfile.node.alpine
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions gui/Containerfile.node.buster
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion gui/serve.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit fc988e4

Please sign in to comment.