if there is an env var named `PORT` , this is auto...
# announcements
b
if there is an env var named
PORT
, this is automatically used by both the
front-end
and
backend
and there is a conflict?
f
the PORT is only used for the API
b
does the
front-end
listen/expect for another env var?
f
it uses the port from the APP_ORIGIN (eg: http://localhost:3000)
b
I am trying to deploy it on
kubernetes
with these env vars
Copy code
NODE_ENV: production
        PORT: 20000
        APP_ORIGIN: <https://localhost:3000>
        APP_HOST: <http://localhost:20000>
it fails with
Copy code
"err":{"type":"Error","message":"listen EADDRINUSE: address already in use :::20000",
f
its API_HOST
b
🤦‍♂️
switched to this
Copy code
NODE_ENV: production
        PORT: 3100
        APP_ORIGIN: <https://localhost:3000>
        API_HOST: <http://localhost:3100>
but getting the same...
Copy code
"err":{"type":"Error","message":"listen EADDRINUSE: address already in use :::3100"
f
not sure you have access, but can you check what is running?
Copy code
sudo lsof -i :3100
b
not able to do much now....
Copy code
k exec -it growthbook-api-web-65cc97ccd4-q2gv2 -- "bash -c 'lsof -i :3100'"
E0519 01:18:08.430815   82577 v3.go:79] EOF
                                           error: Internal error occurred: error executing command in container: failed to exec in container: container is in CONTAINER_EXITED state
anyway will try to reproduce this 2morrow, thanks for the feedback so far