stanford-oval / genie-server

The home server version of Almond

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Docker port mapping websocket errors

Guigxs opened this issue · comments

Hi,
I'm trying to install genie-server on my desktop with docker. But I'm facing some websocket errors while mapping the host port 3001 to the container port 3000.

Any idea how to fix ?

That's my docker command:
docker run --name genie-server -p 3001:3000 stanfordoval/almond-server:latest

genie-server on port 3001:
image

genie-server on port 3000:
image

To prevent cross-origin connections (which would be insecure), the server checks that the Origin header sent by the browser corresponds to the combination of host and port used by the browser. Hence, what you're trying to do is not possible directly.
If you want to run genie-server on a different port, you must set the PORT environment variable in the container to 3001 and map port 3001 to 3001 in the container.

That makes sens, thanks !