After failing to run this container using another container as it's network (for purposes of utilizing a VPN), and finding multiple old issues about people requesting a configurable port for this, I decided to do the work to make the port configurable via an environment variable on the docker container.
My use case was that gluetun VPN uses port 8000 in it's container, so running EPlusTV through that VPN would not work, since ::8000 was already in use.
In this implementation, if the user does not specify a PORT environment variable, this container will work the same as it always did, using port 8000. However, if a user does specify the PORT variable, the express server will run on whatever port is specified.
After failing to run this container using another container as it's network (for purposes of utilizing a VPN), and finding multiple old issues about people requesting a configurable port for this, I decided to do the work to make the port configurable via an environment variable on the docker container.
My use case was that gluetun VPN uses port 8000 in it's container, so running EPlusTV through that VPN would not work, since ::8000 was already in use.
In this implementation, if the user does not specify a
PORT
environment variable, this container will work the same as it always did, using port 8000. However, if a user does specify thePORT
variable, the express server will run on whatever port is specified.